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.
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: {
mask: "https://replicate.delivery/pbxt/JF3Ld3yPLVA3JIELHx1uaAV5CQOyr4AoiOfo6mJZn2fofGaT/dog-mask.png",
image: "https://replicate.delivery/pbxt/JF3LddQgRiMM9Q4Smyfw7q7BR9Gn0PwkSWvJjKDPxyvr8Ru0/cool-dog.png",
width: 1024,
height: 1024,
prompt: "An orange cat sitting on a bench",
refine: "base_image_refiner",
scheduler: "KarrasDPM",
num_outputs: 1,
guidance_scale: 7.5,
high_noise_frac: 0.8,
negative_prompt: "",
prompt_strength: 0.8,
num_inference_steps: 25
}
}
);
// 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={
"mask": "https://replicate.delivery/pbxt/JF3Ld3yPLVA3JIELHx1uaAV5CQOyr4AoiOfo6mJZn2fofGaT/dog-mask.png",
"image": "https://replicate.delivery/pbxt/JF3LddQgRiMM9Q4Smyfw7q7BR9Gn0PwkSWvJjKDPxyvr8Ru0/cool-dog.png",
"width": 1024,
"height": 1024,
"prompt": "An orange cat sitting on a bench",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
)
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": {
"mask": "https://replicate.delivery/pbxt/JF3Ld3yPLVA3JIELHx1uaAV5CQOyr4AoiOfo6mJZn2fofGaT/dog-mask.png",
"image": "https://replicate.delivery/pbxt/JF3LddQgRiMM9Q4Smyfw7q7BR9Gn0PwkSWvJjKDPxyvr8Ru0/cool-dog.png",
"width": 1024,
"height": 1024,
"prompt": "An orange cat sitting on a bench",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
}' \
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-07-26T19:59:46.932300Z",
"created_at": "2023-07-26T19:59:13.479776Z",
"data_removed": false,
"error": null,
"id": "faz67o3bvxmrr5ydw7yhustwfq",
"input": {
"mask": "https://replicate.delivery/pbxt/JF3Ld3yPLVA3JIELHx1uaAV5CQOyr4AoiOfo6mJZn2fofGaT/dog-mask.png",
"image": "https://replicate.delivery/pbxt/JF3LddQgRiMM9Q4Smyfw7q7BR9Gn0PwkSWvJjKDPxyvr8Ru0/cool-dog.png",
"width": 1024,
"height": 1024,
"prompt": "An orange cat sitting on a bench",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"prompt_strength": 0.8,
"num_inference_steps": 25
},
"logs": "Using seed: 47363\ninpainting mode\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:04, 4.62it/s]\n 10%|█ | 2/20 [00:00<00:03, 4.84it/s]\n 15%|█▌ | 3/20 [00:00<00:03, 4.91it/s]\n 20%|██ | 4/20 [00:00<00:03, 4.94it/s]\n 25%|██▌ | 5/20 [00:01<00:03, 4.95it/s]\n 30%|███ | 6/20 [00:01<00:02, 4.96it/s]\n 35%|███▌ | 7/20 [00:01<00:02, 4.96it/s]\n 40%|████ | 8/20 [00:01<00:02, 4.96it/s]\n 45%|████▌ | 9/20 [00:01<00:02, 4.97it/s]\n 50%|█████ | 10/20 [00:02<00:02, 4.98it/s]\n 55%|█████▌ | 11/20 [00:02<00:01, 4.98it/s]\n 60%|██████ | 12/20 [00:02<00:01, 4.98it/s]\n 65%|██████▌ | 13/20 [00:02<00:01, 4.98it/s]\n 70%|███████ | 14/20 [00:02<00:01, 4.98it/s]\n 75%|███████▌ | 15/20 [00:03<00:01, 4.97it/s]\n 80%|████████ | 16/20 [00:03<00:00, 4.97it/s]\n 85%|████████▌ | 17/20 [00:03<00:00, 4.97it/s]\n 90%|█████████ | 18/20 [00:03<00:00, 4.96it/s]\n 95%|█████████▌| 19/20 [00:03<00:00, 4.96it/s]\n100%|██████████| 20/20 [00:04<00:00, 4.96it/s]\n100%|██████████| 20/20 [00:04<00:00, 4.95it/s]\n 0%| | 0/7 [00:00<?, ?it/s]\n 14%|█▍ | 1/7 [00:00<00:01, 4.25it/s]\n 29%|██▊ | 2/7 [00:00<00:01, 4.30it/s]\n 43%|████▎ | 3/7 [00:00<00:00, 4.31it/s]\n 57%|█████▋ | 4/7 [00:00<00:00, 4.32it/s]\n 71%|███████▏ | 5/7 [00:01<00:00, 4.33it/s]\n 86%|████████▌ | 6/7 [00:01<00:00, 4.33it/s]\n100%|██████████| 7/7 [00:01<00:00, 4.33it/s]\n100%|██████████| 7/7 [00:01<00:00, 4.32it/s]",
"metrics": {
"predict_time": 10.301413,
"total_time": 33.452524
},
"output": [
"https://replicate.delivery/pbxt/p6Pt5qCuQGYGDxzAbB3goyeFguncwZ8EPj8Ncl7JPhCZa5pIA/out-0.png"
],
"started_at": "2023-07-26T19:59:36.630887Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/faz67o3bvxmrr5ydw7yhustwfq",
"cancel": "https://api.replicate.com/v1/predictions/faz67o3bvxmrr5ydw7yhustwfq/cancel"
},
"version": "610dddf033f10431b1b55f24510b6009fcba23017ee551a1b9afbc4eec79e29c"
}
Using seed: 47363
inpainting mode
0%| | 0/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:04, 4.62it/s]
10%|█ | 2/20 [00:00<00:03, 4.84it/s]
15%|█▌ | 3/20 [00:00<00:03, 4.91it/s]
20%|██ | 4/20 [00:00<00:03, 4.94it/s]
25%|██▌ | 5/20 [00:01<00:03, 4.95it/s]
30%|███ | 6/20 [00:01<00:02, 4.96it/s]
35%|███▌ | 7/20 [00:01<00:02, 4.96it/s]
40%|████ | 8/20 [00:01<00:02, 4.96it/s]
45%|████▌ | 9/20 [00:01<00:02, 4.97it/s]
50%|█████ | 10/20 [00:02<00:02, 4.98it/s]
55%|█████▌ | 11/20 [00:02<00:01, 4.98it/s]
60%|██████ | 12/20 [00:02<00:01, 4.98it/s]
65%|██████▌ | 13/20 [00:02<00:01, 4.98it/s]
70%|███████ | 14/20 [00:02<00:01, 4.98it/s]
75%|███████▌ | 15/20 [00:03<00:01, 4.97it/s]
80%|████████ | 16/20 [00:03<00:00, 4.97it/s]
85%|████████▌ | 17/20 [00:03<00:00, 4.97it/s]
90%|█████████ | 18/20 [00:03<00:00, 4.96it/s]
95%|█████████▌| 19/20 [00:03<00:00, 4.96it/s]
100%|██████████| 20/20 [00:04<00:00, 4.96it/s]
100%|██████████| 20/20 [00:04<00:00, 4.95it/s]
0%| | 0/7 [00:00<?, ?it/s]
14%|█▍ | 1/7 [00:00<00:01, 4.25it/s]
29%|██▊ | 2/7 [00:00<00:01, 4.30it/s]
43%|████▎ | 3/7 [00:00<00:00, 4.31it/s]
57%|█████▋ | 4/7 [00:00<00:00, 4.32it/s]
71%|███████▏ | 5/7 [00:01<00:00, 4.33it/s]
86%|████████▌ | 6/7 [00:01<00:00, 4.33it/s]
100%|██████████| 7/7 [00:01<00:00, 4.33it/s]
100%|██████████| 7/7 [00:01<00:00, 4.32it/s]