Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
martintmv-git /sdxl-cinematic:40224311
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run martintmv-git/sdxl-cinematic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"martintmv-git/sdxl-cinematic:40224311d882f9cd120ea648c0bd11836b606b70b4dc215a7c6661235eefbaf2",
{
input: {
width: 1024,
height: 512,
prompt: "A medieval knight standing in a misty forest, with a castle visible in the distance, in the style of TOK, crisp, sharp, photorealistic, movie scene",
refine: "expert_ensemble_refiner",
scheduler: "K_EULER",
lora_scale: 0.8,
num_outputs: 1,
guidance_scale: 7.5,
apply_watermark: true,
high_noise_frac: 0.8,
negative_prompt: "cropped, worst quality, low quality, glitch, deformed, mutated, disfigured",
prompt_strength: 0.8,
num_inference_steps: 70
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run martintmv-git/sdxl-cinematic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"martintmv-git/sdxl-cinematic:40224311d882f9cd120ea648c0bd11836b606b70b4dc215a7c6661235eefbaf2",
input={
"width": 1024,
"height": 512,
"prompt": "A medieval knight standing in a misty forest, with a castle visible in the distance, in the style of TOK, crisp, sharp, photorealistic, movie scene",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.8,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": True,
"high_noise_frac": 0.8,
"negative_prompt": "cropped, worst quality, low quality, glitch, deformed, mutated, disfigured",
"prompt_strength": 0.8,
"num_inference_steps": 70
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run martintmv-git/sdxl-cinematic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "martintmv-git/sdxl-cinematic:40224311d882f9cd120ea648c0bd11836b606b70b4dc215a7c6661235eefbaf2",
"input": {
"width": 1024,
"height": 512,
"prompt": "A medieval knight standing in a misty forest, with a castle visible in the distance, in the style of TOK, crisp, sharp, photorealistic, movie scene",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.8,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": true,
"high_noise_frac": 0.8,
"negative_prompt": "cropped, worst quality, low quality, glitch, deformed, mutated, disfigured",
"prompt_strength": 0.8,
"num_inference_steps": 70
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-12-18T22:24:04.685958Z",
"created_at": "2023-12-18T22:23:49.147331Z",
"data_removed": false,
"error": null,
"id": "zh3rek3b464uvbicmr3jajgrnq",
"input": {
"width": 1024,
"height": 512,
"prompt": "A medieval knight standing in a misty forest, with a castle visible in the distance, in the style of TOK, crisp, sharp, photorealistic, movie scene",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.8,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": true,
"high_noise_frac": 0.8,
"negative_prompt": "cropped, worst quality, low quality, glitch, deformed, mutated, disfigured",
"prompt_strength": 0.8,
"num_inference_steps": 70
},
"logs": "Using seed: 47266\nEnsuring enough disk space...\nFree disk space: 3213668261888\nDownloading weights: https://replicate.delivery/pbxt/HfFr4HaeymgDTEUFvcGuiUsLXUYRmRQdQYe9RZnduvh2hNHkA/trained_model.tar\n2023-12-18T22:23:53Z | INFO | [ Initiating ] dest=/src/weights-cache/ff016a5a915406b1 minimum_chunk_size=150M url=https://replicate.delivery/pbxt/HfFr4HaeymgDTEUFvcGuiUsLXUYRmRQdQYe9RZnduvh2hNHkA/trained_model.tar\n2023-12-18T22:23:53Z | INFO | [ Complete ] dest=/src/weights-cache/ff016a5a915406b1 size=\"186 MB\" total_elapsed=0.500s url=https://replicate.delivery/pbxt/HfFr4HaeymgDTEUFvcGuiUsLXUYRmRQdQYe9RZnduvh2hNHkA/trained_model.tar\nb''\nDownloaded weights in 0.6219019889831543 seconds\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: A medieval knight standing in a misty forest, with a castle visible in the distance, in the style of <s0><s1>, crisp, sharp, photorealistic, movie scene\ntxt2img mode\n 0%| | 0/55 [00:00<?, ?it/s]\n 2%|▏ | 1/55 [00:00<00:10, 5.39it/s]\n 4%|▎ | 2/55 [00:00<00:08, 6.39it/s]\n 5%|▌ | 3/55 [00:00<00:07, 6.78it/s]\n 7%|▋ | 4/55 [00:00<00:07, 6.99it/s]\n 9%|▉ | 5/55 [00:00<00:07, 7.11it/s]\n 11%|█ | 6/55 [00:00<00:06, 7.18it/s]\n 13%|█▎ | 7/55 [00:01<00:06, 7.22it/s]\n 15%|█▍ | 8/55 [00:01<00:06, 7.24it/s]\n 16%|█▋ | 9/55 [00:01<00:06, 7.27it/s]\n 18%|█▊ | 10/55 [00:01<00:06, 7.28it/s]\n 20%|██ | 11/55 [00:01<00:06, 7.29it/s]\n 22%|██▏ | 12/55 [00:01<00:05, 7.30it/s]\n 24%|██▎ | 13/55 [00:01<00:05, 7.29it/s]\n 25%|██▌ | 14/55 [00:01<00:05, 7.30it/s]\n 27%|██▋ | 15/55 [00:02<00:05, 7.29it/s]\n 29%|██▉ | 16/55 [00:02<00:05, 7.30it/s]\n 31%|███ | 17/55 [00:02<00:05, 7.30it/s]\n 33%|███▎ | 18/55 [00:02<00:05, 7.30it/s]\n 35%|███▍ | 19/55 [00:02<00:04, 7.29it/s]\n 36%|███▋ | 20/55 [00:02<00:04, 7.29it/s]\n 38%|███▊ | 21/55 [00:02<00:04, 7.28it/s]\n 40%|████ | 22/55 [00:03<00:04, 7.28it/s]\n 42%|████▏ | 23/55 [00:03<00:04, 7.27it/s]\n 44%|████▎ | 24/55 [00:03<00:04, 7.28it/s]\n 45%|████▌ | 25/55 [00:03<00:04, 7.28it/s]\n 47%|████▋ | 26/55 [00:03<00:03, 7.28it/s]\n 49%|████▉ | 27/55 [00:03<00:03, 7.29it/s]\n 51%|█████ | 28/55 [00:03<00:03, 7.28it/s]\n 53%|█████▎ | 29/55 [00:04<00:03, 7.27it/s]\n 55%|█████▍ | 30/55 [00:04<00:03, 7.27it/s]\n 56%|█████▋ | 31/55 [00:04<00:03, 7.27it/s]\n 58%|█████▊ | 32/55 [00:04<00:03, 7.27it/s]\n 60%|██████ | 33/55 [00:04<00:03, 7.27it/s]\n 62%|██████▏ | 34/55 [00:04<00:02, 7.28it/s]\n 64%|██████▎ | 35/55 [00:04<00:02, 7.28it/s]\n 65%|██████▌ | 36/55 [00:04<00:02, 7.28it/s]\n 67%|██████▋ | 37/55 [00:05<00:02, 7.27it/s]\n 69%|██████▉ | 38/55 [00:05<00:02, 7.26it/s]\n 71%|███████ | 39/55 [00:05<00:02, 7.27it/s]\n 73%|███████▎ | 40/55 [00:05<00:02, 7.27it/s]\n 75%|███████▍ | 41/55 [00:05<00:01, 7.27it/s]\n 76%|███████▋ | 42/55 [00:05<00:01, 7.28it/s]\n 78%|███████▊ | 43/55 [00:05<00:01, 7.27it/s]\n 80%|████████ | 44/55 [00:06<00:01, 7.27it/s]\n 82%|████████▏ | 45/55 [00:06<00:01, 7.26it/s]\n 84%|████████▎ | 46/55 [00:06<00:01, 7.26it/s]\n 85%|████████▌ | 47/55 [00:06<00:01, 7.26it/s]\n 87%|████████▋ | 48/55 [00:06<00:00, 7.26it/s]\n 89%|████████▉ | 49/55 [00:06<00:00, 7.27it/s]\n 91%|█████████ | 50/55 [00:06<00:00, 7.27it/s]\n 93%|█████████▎| 51/55 [00:07<00:00, 7.27it/s]\n 95%|█████████▍| 52/55 [00:07<00:00, 7.27it/s]\n 96%|█████████▋| 53/55 [00:07<00:00, 7.26it/s]\n 98%|█████████▊| 54/55 [00:07<00:00, 7.26it/s]\n100%|██████████| 55/55 [00:07<00:00, 7.26it/s]\n100%|██████████| 55/55 [00:07<00:00, 7.23it/s]\n 0%| | 0/15 [00:00<?, ?it/s]\n 7%|▋ | 1/15 [00:00<00:01, 7.41it/s]\n 13%|█▎ | 2/15 [00:00<00:01, 8.07it/s]\n 20%|██ | 3/15 [00:00<00:01, 8.30it/s]\n 27%|██▋ | 4/15 [00:00<00:01, 8.41it/s]\n 33%|███▎ | 5/15 [00:00<00:01, 8.48it/s]\n 40%|████ | 6/15 [00:00<00:01, 8.52it/s]\n 47%|████▋ | 7/15 [00:00<00:00, 8.55it/s]\n 53%|█████▎ | 8/15 [00:00<00:00, 8.55it/s]\n 60%|██████ | 9/15 [00:01<00:00, 8.54it/s]\n 67%|██████▋ | 10/15 [00:01<00:00, 8.55it/s]\n 73%|███████▎ | 11/15 [00:01<00:00, 8.55it/s]\n 80%|████████ | 12/15 [00:01<00:00, 8.55it/s]\n 87%|████████▋ | 13/15 [00:01<00:00, 8.56it/s]\n 93%|█████████▎| 14/15 [00:01<00:00, 8.58it/s]\n100%|██████████| 15/15 [00:01<00:00, 8.58it/s]\n100%|██████████| 15/15 [00:01<00:00, 8.49it/s]",
"metrics": {
"predict_time": 11.489998,
"total_time": 15.538627
},
"output": [
"https://replicate.delivery/pbxt/jVFMVKiPFSKeOafqhfsbQudz0UKQEKHewPtNE1sTwm8TIecQC/out-0.png"
],
"started_at": "2023-12-18T22:23:53.195960Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/zh3rek3b464uvbicmr3jajgrnq",
"cancel": "https://api.replicate.com/v1/predictions/zh3rek3b464uvbicmr3jajgrnq/cancel"
},
"version": "40224311d882f9cd120ea648c0bd11836b606b70b4dc215a7c6661235eefbaf2"
}
Using seed: 47266
Ensuring enough disk space...
Free disk space: 3213668261888
Downloading weights: https://replicate.delivery/pbxt/HfFr4HaeymgDTEUFvcGuiUsLXUYRmRQdQYe9RZnduvh2hNHkA/trained_model.tar
2023-12-18T22:23:53Z | INFO | [ Initiating ] dest=/src/weights-cache/ff016a5a915406b1 minimum_chunk_size=150M url=https://replicate.delivery/pbxt/HfFr4HaeymgDTEUFvcGuiUsLXUYRmRQdQYe9RZnduvh2hNHkA/trained_model.tar
2023-12-18T22:23:53Z | INFO | [ Complete ] dest=/src/weights-cache/ff016a5a915406b1 size="186 MB" total_elapsed=0.500s url=https://replicate.delivery/pbxt/HfFr4HaeymgDTEUFvcGuiUsLXUYRmRQdQYe9RZnduvh2hNHkA/trained_model.tar
b''
Downloaded weights in 0.6219019889831543 seconds
Loading fine-tuned model
Does not have Unet. assume we are using LoRA
Loading Unet LoRA
Prompt: A medieval knight standing in a misty forest, with a castle visible in the distance, in the style of <s0><s1>, crisp, sharp, photorealistic, movie scene
txt2img mode
0%| | 0/55 [00:00<?, ?it/s]
2%|▏ | 1/55 [00:00<00:10, 5.39it/s]
4%|▎ | 2/55 [00:00<00:08, 6.39it/s]
5%|▌ | 3/55 [00:00<00:07, 6.78it/s]
7%|▋ | 4/55 [00:00<00:07, 6.99it/s]
9%|▉ | 5/55 [00:00<00:07, 7.11it/s]
11%|█ | 6/55 [00:00<00:06, 7.18it/s]
13%|█▎ | 7/55 [00:01<00:06, 7.22it/s]
15%|█▍ | 8/55 [00:01<00:06, 7.24it/s]
16%|█▋ | 9/55 [00:01<00:06, 7.27it/s]
18%|█▊ | 10/55 [00:01<00:06, 7.28it/s]
20%|██ | 11/55 [00:01<00:06, 7.29it/s]
22%|██▏ | 12/55 [00:01<00:05, 7.30it/s]
24%|██▎ | 13/55 [00:01<00:05, 7.29it/s]
25%|██▌ | 14/55 [00:01<00:05, 7.30it/s]
27%|██▋ | 15/55 [00:02<00:05, 7.29it/s]
29%|██▉ | 16/55 [00:02<00:05, 7.30it/s]
31%|███ | 17/55 [00:02<00:05, 7.30it/s]
33%|███▎ | 18/55 [00:02<00:05, 7.30it/s]
35%|███▍ | 19/55 [00:02<00:04, 7.29it/s]
36%|███▋ | 20/55 [00:02<00:04, 7.29it/s]
38%|███▊ | 21/55 [00:02<00:04, 7.28it/s]
40%|████ | 22/55 [00:03<00:04, 7.28it/s]
42%|████▏ | 23/55 [00:03<00:04, 7.27it/s]
44%|████▎ | 24/55 [00:03<00:04, 7.28it/s]
45%|████▌ | 25/55 [00:03<00:04, 7.28it/s]
47%|████▋ | 26/55 [00:03<00:03, 7.28it/s]
49%|████▉ | 27/55 [00:03<00:03, 7.29it/s]
51%|█████ | 28/55 [00:03<00:03, 7.28it/s]
53%|█████▎ | 29/55 [00:04<00:03, 7.27it/s]
55%|█████▍ | 30/55 [00:04<00:03, 7.27it/s]
56%|█████▋ | 31/55 [00:04<00:03, 7.27it/s]
58%|█████▊ | 32/55 [00:04<00:03, 7.27it/s]
60%|██████ | 33/55 [00:04<00:03, 7.27it/s]
62%|██████▏ | 34/55 [00:04<00:02, 7.28it/s]
64%|██████▎ | 35/55 [00:04<00:02, 7.28it/s]
65%|██████▌ | 36/55 [00:04<00:02, 7.28it/s]
67%|██████▋ | 37/55 [00:05<00:02, 7.27it/s]
69%|██████▉ | 38/55 [00:05<00:02, 7.26it/s]
71%|███████ | 39/55 [00:05<00:02, 7.27it/s]
73%|███████▎ | 40/55 [00:05<00:02, 7.27it/s]
75%|███████▍ | 41/55 [00:05<00:01, 7.27it/s]
76%|███████▋ | 42/55 [00:05<00:01, 7.28it/s]
78%|███████▊ | 43/55 [00:05<00:01, 7.27it/s]
80%|████████ | 44/55 [00:06<00:01, 7.27it/s]
82%|████████▏ | 45/55 [00:06<00:01, 7.26it/s]
84%|████████▎ | 46/55 [00:06<00:01, 7.26it/s]
85%|████████▌ | 47/55 [00:06<00:01, 7.26it/s]
87%|████████▋ | 48/55 [00:06<00:00, 7.26it/s]
89%|████████▉ | 49/55 [00:06<00:00, 7.27it/s]
91%|█████████ | 50/55 [00:06<00:00, 7.27it/s]
93%|█████████▎| 51/55 [00:07<00:00, 7.27it/s]
95%|█████████▍| 52/55 [00:07<00:00, 7.27it/s]
96%|█████████▋| 53/55 [00:07<00:00, 7.26it/s]
98%|█████████▊| 54/55 [00:07<00:00, 7.26it/s]
100%|██████████| 55/55 [00:07<00:00, 7.26it/s]
100%|██████████| 55/55 [00:07<00:00, 7.23it/s]
0%| | 0/15 [00:00<?, ?it/s]
7%|▋ | 1/15 [00:00<00:01, 7.41it/s]
13%|█▎ | 2/15 [00:00<00:01, 8.07it/s]
20%|██ | 3/15 [00:00<00:01, 8.30it/s]
27%|██▋ | 4/15 [00:00<00:01, 8.41it/s]
33%|███▎ | 5/15 [00:00<00:01, 8.48it/s]
40%|████ | 6/15 [00:00<00:01, 8.52it/s]
47%|████▋ | 7/15 [00:00<00:00, 8.55it/s]
53%|█████▎ | 8/15 [00:00<00:00, 8.55it/s]
60%|██████ | 9/15 [00:01<00:00, 8.54it/s]
67%|██████▋ | 10/15 [00:01<00:00, 8.55it/s]
73%|███████▎ | 11/15 [00:01<00:00, 8.55it/s]
80%|████████ | 12/15 [00:01<00:00, 8.55it/s]
87%|████████▋ | 13/15 [00:01<00:00, 8.56it/s]
93%|█████████▎| 14/15 [00:01<00:00, 8.58it/s]
100%|██████████| 15/15 [00:01<00:00, 8.58it/s]
100%|██████████| 15/15 [00:01<00:00, 8.49it/s]