You're looking at a specific version of this model. Jump to the model overview.
stability-ai /sdxl:610dddf0
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run stability-ai/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"stability-ai/sdxl:610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c",
{
input: {
width: 1248,
height: 832,
prompt: "A beautiful landscape photo",
refine: "expert_ensemble_refiner",
scheduler: "KarrasDPM",
num_outputs: 1,
guidance_scale: 7.5,
high_noise_frac: 0.8,
negative_prompt: "soft, blurry, ugly",
prompt_strength: 0.8,
num_inference_steps: 50
}
}
);
// 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 stability-ai/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/sdxl:610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c",
input={
"width": 1248,
"height": 832,
"prompt": "A beautiful landscape photo",
"refine": "expert_ensemble_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "soft, blurry, ugly",
"prompt_strength": 0.8,
"num_inference_steps": 50
}
)
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 stability-ai/sdxl 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": "610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c",
"input": {
"width": 1248,
"height": 832,
"prompt": "A beautiful landscape photo",
"refine": "expert_ensemble_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "soft, blurry, ugly",
"prompt_strength": 0.8,
"num_inference_steps": 50
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/stability-ai/sdxl@sha256:610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c \
-i 'width=1248' \
-i 'height=832' \
-i 'prompt="A beautiful landscape photo"' \
-i 'refine="expert_ensemble_refiner"' \
-i 'scheduler="KarrasDPM"' \
-i 'num_outputs=1' \
-i 'guidance_scale=7.5' \
-i 'high_noise_frac=0.8' \
-i 'negative_prompt="soft, blurry, ugly"' \
-i 'prompt_strength=0.8' \
-i 'num_inference_steps=50'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/stability-ai/sdxl@sha256:610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 1248, "height": 832, "prompt": "A beautiful landscape photo", "refine": "expert_ensemble_refiner", "scheduler": "KarrasDPM", "num_outputs": 1, "guidance_scale": 7.5, "high_noise_frac": 0.8, "negative_prompt": "soft, blurry, ugly", "prompt_strength": 0.8, "num_inference_steps": 50 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.012. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-07-26T20:01:03.053313Z",
"created_at": "2023-07-26T20:00:52.342022Z",
"data_removed": false,
"error": null,
"id": "lrmn5btbq2o5xpbksl56fw4y64",
"input": {
"width": 1248,
"height": 832,
"prompt": "A beautiful landscape photo",
"refine": "expert_ensemble_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "soft, blurry, ugly",
"prompt_strength": 0.8,
"num_inference_steps": 50
},
"logs": "Using seed: 58684\ntxt2img mode\n 0%| | 0/31 [00:00<?, ?it/s]\n 3%|▎ | 1/31 [00:00<00:06, 4.80it/s]\n 6%|▋ | 2/31 [00:00<00:05, 4.89it/s]\n 10%|▉ | 3/31 [00:00<00:05, 4.92it/s]\n 13%|█▎ | 4/31 [00:00<00:05, 4.94it/s]\n 16%|█▌ | 5/31 [00:01<00:05, 4.95it/s]\n 19%|█▉ | 6/31 [00:01<00:05, 4.95it/s]\n 23%|██▎ | 7/31 [00:01<00:04, 4.97it/s]\n 26%|██▌ | 8/31 [00:01<00:04, 4.97it/s]\n 29%|██▉ | 9/31 [00:01<00:04, 4.98it/s]\n 32%|███▏ | 10/31 [00:02<00:04, 4.98it/s]\n 35%|███▌ | 11/31 [00:02<00:04, 4.97it/s]\n 39%|███▊ | 12/31 [00:02<00:03, 4.98it/s]\n 42%|████▏ | 13/31 [00:02<00:03, 4.98it/s]\n 45%|████▌ | 14/31 [00:02<00:03, 4.99it/s]\n 48%|████▊ | 15/31 [00:03<00:03, 4.98it/s]\n 52%|█████▏ | 16/31 [00:03<00:03, 4.98it/s]\n 55%|█████▍ | 17/31 [00:03<00:02, 4.98it/s]\n 58%|█████▊ | 18/31 [00:03<00:02, 4.98it/s]\n 61%|██████▏ | 19/31 [00:03<00:02, 4.98it/s]\n 65%|██████▍ | 20/31 [00:04<00:02, 4.97it/s]\n 68%|██████▊ | 21/31 [00:04<00:02, 4.98it/s]\n 71%|███████ | 22/31 [00:04<00:01, 4.97it/s]\n 74%|███████▍ | 23/31 [00:04<00:01, 4.97it/s]\n 77%|███████▋ | 24/31 [00:04<00:01, 4.97it/s]\n 81%|████████ | 25/31 [00:05<00:01, 4.97it/s]\n 84%|████████▍ | 26/31 [00:05<00:01, 4.97it/s]\n 87%|████████▋ | 27/31 [00:05<00:00, 4.97it/s]\n 90%|█████████ | 28/31 [00:05<00:00, 4.97it/s]\n 94%|█████████▎| 29/31 [00:05<00:00, 4.97it/s]\n 97%|█████████▋| 30/31 [00:06<00:00, 4.97it/s]\n100%|██████████| 31/31 [00:06<00:00, 4.97it/s]\n100%|██████████| 31/31 [00:06<00:00, 4.97it/s]\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:02, 4.15it/s]\n 20%|██ | 2/10 [00:00<00:01, 4.21it/s]\n 30%|███ | 3/10 [00:00<00:01, 4.23it/s]\n 40%|████ | 4/10 [00:00<00:01, 4.24it/s]\n 50%|█████ | 5/10 [00:01<00:01, 4.24it/s]\n 60%|██████ | 6/10 [00:01<00:00, 4.24it/s]\n 70%|███████ | 7/10 [00:01<00:00, 4.24it/s]\n 80%|████████ | 8/10 [00:01<00:00, 4.24it/s]\n 90%|█████████ | 9/10 [00:02<00:00, 4.24it/s]\n100%|██████████| 10/10 [00:02<00:00, 4.24it/s]\n100%|██████████| 10/10 [00:02<00:00, 4.24it/s]",
"metrics": {
"predict_time": 10.725354,
"total_time": 10.711291
},
"output": [
"https://replicate.delivery/pbxt/zIPS4uyGONKvKBg9iTA6FRC785eK7eWhpewpR7W0RnF9rlniA/out-0.png"
],
"started_at": "2023-07-26T20:00:52.327959Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/lrmn5btbq2o5xpbksl56fw4y64",
"cancel": "https://api.replicate.com/v1/predictions/lrmn5btbq2o5xpbksl56fw4y64/cancel"
},
"version": "610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c"
}
Using seed: 58684
txt2img mode
0%| | 0/31 [00:00<?, ?it/s]
3%|▎ | 1/31 [00:00<00:06, 4.80it/s]
6%|▋ | 2/31 [00:00<00:05, 4.89it/s]
10%|▉ | 3/31 [00:00<00:05, 4.92it/s]
13%|█▎ | 4/31 [00:00<00:05, 4.94it/s]
16%|█▌ | 5/31 [00:01<00:05, 4.95it/s]
19%|█▉ | 6/31 [00:01<00:05, 4.95it/s]
23%|██▎ | 7/31 [00:01<00:04, 4.97it/s]
26%|██▌ | 8/31 [00:01<00:04, 4.97it/s]
29%|██▉ | 9/31 [00:01<00:04, 4.98it/s]
32%|███▏ | 10/31 [00:02<00:04, 4.98it/s]
35%|███▌ | 11/31 [00:02<00:04, 4.97it/s]
39%|███▊ | 12/31 [00:02<00:03, 4.98it/s]
42%|████▏ | 13/31 [00:02<00:03, 4.98it/s]
45%|████▌ | 14/31 [00:02<00:03, 4.99it/s]
48%|████▊ | 15/31 [00:03<00:03, 4.98it/s]
52%|█████▏ | 16/31 [00:03<00:03, 4.98it/s]
55%|█████▍ | 17/31 [00:03<00:02, 4.98it/s]
58%|█████▊ | 18/31 [00:03<00:02, 4.98it/s]
61%|██████▏ | 19/31 [00:03<00:02, 4.98it/s]
65%|██████▍ | 20/31 [00:04<00:02, 4.97it/s]
68%|██████▊ | 21/31 [00:04<00:02, 4.98it/s]
71%|███████ | 22/31 [00:04<00:01, 4.97it/s]
74%|███████▍ | 23/31 [00:04<00:01, 4.97it/s]
77%|███████▋ | 24/31 [00:04<00:01, 4.97it/s]
81%|████████ | 25/31 [00:05<00:01, 4.97it/s]
84%|████████▍ | 26/31 [00:05<00:01, 4.97it/s]
87%|████████▋ | 27/31 [00:05<00:00, 4.97it/s]
90%|█████████ | 28/31 [00:05<00:00, 4.97it/s]
94%|█████████▎| 29/31 [00:05<00:00, 4.97it/s]
97%|█████████▋| 30/31 [00:06<00:00, 4.97it/s]
100%|██████████| 31/31 [00:06<00:00, 4.97it/s]
100%|██████████| 31/31 [00:06<00:00, 4.97it/s]
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [00:00<00:02, 4.15it/s]
20%|██ | 2/10 [00:00<00:01, 4.21it/s]
30%|███ | 3/10 [00:00<00:01, 4.23it/s]
40%|████ | 4/10 [00:00<00:01, 4.24it/s]
50%|█████ | 5/10 [00:01<00:01, 4.24it/s]
60%|██████ | 6/10 [00:01<00:00, 4.24it/s]
70%|███████ | 7/10 [00:01<00:00, 4.24it/s]
80%|████████ | 8/10 [00:01<00:00, 4.24it/s]
90%|█████████ | 9/10 [00:02<00:00, 4.24it/s]
100%|██████████| 10/10 [00:02<00:00, 4.24it/s]
100%|██████████| 10/10 [00:02<00:00, 4.24it/s]