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:2b017d9b
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:2b017d9b67edd2ee1401238df49d75da53c523f36e363881e057f5dc3ed3c5b2",
{
input: {
mask: "https://replicate.delivery/pbxt/JFIZFfJsSnWgxbTmEYLqhHIGdZo9o2BX3p47wSdn55HWtMON/mask1.png",
seed: 46099,
image: "https://replicate.delivery/pbxt/JF3foGR90vm9BXSEXNaYkaeVKHYbJPinmpbMFvRtlDpH4MMk/out-0-1.png",
width: 1024,
height: 1024,
prompt: "A rainbow coloured bear",
refine: "base_image_refiner",
scheduler: "KarrasDPM",
num_outputs: 1,
refine_steps: 50,
guidance_scale: 7.5,
high_noise_frac: 0.8,
negative_prompt: "",
prompt_strength: 0.95,
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:2b017d9b67edd2ee1401238df49d75da53c523f36e363881e057f5dc3ed3c5b2",
input={
"mask": "https://replicate.delivery/pbxt/JFIZFfJsSnWgxbTmEYLqhHIGdZo9o2BX3p47wSdn55HWtMON/mask1.png",
"seed": 46099,
"image": "https://replicate.delivery/pbxt/JF3foGR90vm9BXSEXNaYkaeVKHYbJPinmpbMFvRtlDpH4MMk/out-0-1.png",
"width": 1024,
"height": 1024,
"prompt": "A rainbow coloured bear",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"refine_steps": 50,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.95,
"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": "2b017d9b67edd2ee1401238df49d75da53c523f36e363881e057f5dc3ed3c5b2",
"input": {
"mask": "https://replicate.delivery/pbxt/JFIZFfJsSnWgxbTmEYLqhHIGdZo9o2BX3p47wSdn55HWtMON/mask1.png",
"seed": 46099,
"image": "https://replicate.delivery/pbxt/JF3foGR90vm9BXSEXNaYkaeVKHYbJPinmpbMFvRtlDpH4MMk/out-0-1.png",
"width": 1024,
"height": 1024,
"prompt": "A rainbow coloured bear",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"refine_steps": 50,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.95,
"num_inference_steps": 50
}
}' \
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-27T12:36:29.921311Z",
"created_at": "2023-07-27T12:36:13.439420Z",
"data_removed": false,
"error": null,
"id": "z4x5jkdbsnoceeuwmk5lka57uu",
"input": {
"mask": "https://replicate.delivery/pbxt/JFIZFfJsSnWgxbTmEYLqhHIGdZo9o2BX3p47wSdn55HWtMON/mask1.png",
"seed": 46099,
"image": "https://replicate.delivery/pbxt/JF3foGR90vm9BXSEXNaYkaeVKHYbJPinmpbMFvRtlDpH4MMk/out-0-1.png",
"width": 1024,
"height": 1024,
"prompt": "A rainbow coloured bear",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"num_outputs": 1,
"refine_steps": 50,
"guidance_scale": 7.5,
"high_noise_frac": 0.8,
"prompt_strength": 0.95,
"num_inference_steps": 50
},
"logs": "Using seed: 46099\ninpainting mode\n 0%| | 0/47 [00:00<?, ?it/s]\n 2%|▏ | 1/47 [00:00<00:09, 4.96it/s]\n 4%|▍ | 2/47 [00:00<00:09, 4.95it/s]\n 6%|▋ | 3/47 [00:00<00:08, 4.94it/s]\n 9%|▊ | 4/47 [00:00<00:08, 4.94it/s]\n 11%|█ | 5/47 [00:01<00:08, 4.93it/s]\n 13%|█▎ | 6/47 [00:01<00:08, 4.93it/s]\n 15%|█▍ | 7/47 [00:01<00:08, 4.93it/s]\n 17%|█▋ | 8/47 [00:01<00:07, 4.92it/s]\n 19%|█▉ | 9/47 [00:01<00:07, 4.92it/s]\n 21%|██▏ | 10/47 [00:02<00:07, 4.91it/s]\n 23%|██▎ | 11/47 [00:02<00:07, 4.91it/s]\n 26%|██▌ | 12/47 [00:02<00:07, 4.92it/s]\n 28%|██▊ | 13/47 [00:02<00:06, 4.92it/s]\n 30%|██▉ | 14/47 [00:02<00:06, 4.91it/s]\n 32%|███▏ | 15/47 [00:03<00:06, 4.90it/s]\n 34%|███▍ | 16/47 [00:03<00:06, 4.90it/s]\n 36%|███▌ | 17/47 [00:03<00:06, 4.91it/s]\n 38%|███▊ | 18/47 [00:03<00:05, 4.90it/s]\n 40%|████ | 19/47 [00:03<00:05, 4.90it/s]\n 43%|████▎ | 20/47 [00:04<00:05, 4.90it/s]\n 45%|████▍ | 21/47 [00:04<00:05, 4.90it/s]\n 47%|████▋ | 22/47 [00:04<00:05, 4.90it/s]\n 49%|████▉ | 23/47 [00:04<00:04, 4.90it/s]\n 51%|█████ | 24/47 [00:04<00:04, 4.90it/s]\n 53%|█████▎ | 25/47 [00:05<00:04, 4.90it/s]\n 55%|█████▌ | 26/47 [00:05<00:04, 4.90it/s]\n 57%|█████▋ | 27/47 [00:05<00:04, 4.90it/s]\n 60%|█████▉ | 28/47 [00:05<00:03, 4.90it/s]\n 62%|██████▏ | 29/47 [00:05<00:03, 4.89it/s]\n 64%|██████▍ | 30/47 [00:06<00:03, 4.89it/s]\n 66%|██████▌ | 31/47 [00:06<00:03, 4.89it/s]\n 68%|██████▊ | 32/47 [00:06<00:03, 4.89it/s]\n 70%|███████ | 33/47 [00:06<00:02, 4.89it/s]\n 72%|███████▏ | 34/47 [00:06<00:02, 4.89it/s]\n 74%|███████▍ | 35/47 [00:07<00:02, 4.89it/s]\n 77%|███████▋ | 36/47 [00:07<00:02, 4.90it/s]\n 79%|███████▊ | 37/47 [00:07<00:02, 4.91it/s]\n 81%|████████ | 38/47 [00:07<00:01, 4.91it/s]\n 83%|████████▎ | 39/47 [00:07<00:01, 4.92it/s]\n 85%|████████▌ | 40/47 [00:08<00:01, 4.92it/s]\n 87%|████████▋ | 41/47 [00:08<00:01, 4.91it/s]\n 89%|████████▉ | 42/47 [00:08<00:01, 4.86it/s]\n 91%|█████████▏| 43/47 [00:08<00:00, 4.87it/s]\n 94%|█████████▎| 44/47 [00:08<00:00, 4.89it/s]\n 96%|█████████▌| 45/47 [00:09<00:00, 4.91it/s]\n98%|█████████▊| 46/47 [00:09<00:00, 4.92it/s]\n98%|█████████▊| 46/47 [00:09<00:00, 4.91it/s]\n 0%| | 0/15 [00:00<?, ?it/s]\n 7%|▋ | 1/15 [00:00<00:03, 4.33it/s]\n 13%|█▎ | 2/15 [00:00<00:03, 4.32it/s]\n 20%|██ | 3/15 [00:00<00:02, 4.32it/s]\n 27%|██▋ | 4/15 [00:00<00:02, 4.31it/s]\n 33%|███▎ | 5/15 [00:01<00:02, 4.31it/s]\n 40%|████ | 6/15 [00:01<00:02, 4.31it/s]\n 47%|████▋ | 7/15 [00:01<00:01, 4.31it/s]\n 53%|█████▎ | 8/15 [00:01<00:01, 4.31it/s]\n 60%|██████ | 9/15 [00:02<00:01, 4.30it/s]\n 67%|██████▋ | 10/15 [00:02<00:01, 4.30it/s]\n 73%|███████▎ | 11/15 [00:02<00:00, 4.30it/s]\n 80%|████████ | 12/15 [00:02<00:00, 4.30it/s]\n 87%|████████▋ | 13/15 [00:03<00:00, 4.30it/s]\n 93%|█████████▎| 14/15 [00:03<00:00, 4.31it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.31it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.31it/s]",
"metrics": {
"predict_time": 16.506152,
"total_time": 16.481891
},
"output": [
"https://replicate.delivery/pbxt/NfV2n6S8wBVRekodJQ6QObMKAS5ntznisaIaAi3fVlIY2CoiA/out-0.png"
],
"started_at": "2023-07-27T12:36:13.415159Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/z4x5jkdbsnoceeuwmk5lka57uu",
"cancel": "https://api.replicate.com/v1/predictions/z4x5jkdbsnoceeuwmk5lka57uu/cancel"
},
"version": "2b017d9b67edd2ee1401238df49d75da53c523f36e363881e057f5dc3ed3c5b2"
}
Using seed: 46099
inpainting mode
0%| | 0/47 [00:00<?, ?it/s]
2%|▏ | 1/47 [00:00<00:09, 4.96it/s]
4%|▍ | 2/47 [00:00<00:09, 4.95it/s]
6%|▋ | 3/47 [00:00<00:08, 4.94it/s]
9%|▊ | 4/47 [00:00<00:08, 4.94it/s]
11%|█ | 5/47 [00:01<00:08, 4.93it/s]
13%|█▎ | 6/47 [00:01<00:08, 4.93it/s]
15%|█▍ | 7/47 [00:01<00:08, 4.93it/s]
17%|█▋ | 8/47 [00:01<00:07, 4.92it/s]
19%|█▉ | 9/47 [00:01<00:07, 4.92it/s]
21%|██▏ | 10/47 [00:02<00:07, 4.91it/s]
23%|██▎ | 11/47 [00:02<00:07, 4.91it/s]
26%|██▌ | 12/47 [00:02<00:07, 4.92it/s]
28%|██▊ | 13/47 [00:02<00:06, 4.92it/s]
30%|██▉ | 14/47 [00:02<00:06, 4.91it/s]
32%|███▏ | 15/47 [00:03<00:06, 4.90it/s]
34%|███▍ | 16/47 [00:03<00:06, 4.90it/s]
36%|███▌ | 17/47 [00:03<00:06, 4.91it/s]
38%|███▊ | 18/47 [00:03<00:05, 4.90it/s]
40%|████ | 19/47 [00:03<00:05, 4.90it/s]
43%|████▎ | 20/47 [00:04<00:05, 4.90it/s]
45%|████▍ | 21/47 [00:04<00:05, 4.90it/s]
47%|████▋ | 22/47 [00:04<00:05, 4.90it/s]
49%|████▉ | 23/47 [00:04<00:04, 4.90it/s]
51%|█████ | 24/47 [00:04<00:04, 4.90it/s]
53%|█████▎ | 25/47 [00:05<00:04, 4.90it/s]
55%|█████▌ | 26/47 [00:05<00:04, 4.90it/s]
57%|█████▋ | 27/47 [00:05<00:04, 4.90it/s]
60%|█████▉ | 28/47 [00:05<00:03, 4.90it/s]
62%|██████▏ | 29/47 [00:05<00:03, 4.89it/s]
64%|██████▍ | 30/47 [00:06<00:03, 4.89it/s]
66%|██████▌ | 31/47 [00:06<00:03, 4.89it/s]
68%|██████▊ | 32/47 [00:06<00:03, 4.89it/s]
70%|███████ | 33/47 [00:06<00:02, 4.89it/s]
72%|███████▏ | 34/47 [00:06<00:02, 4.89it/s]
74%|███████▍ | 35/47 [00:07<00:02, 4.89it/s]
77%|███████▋ | 36/47 [00:07<00:02, 4.90it/s]
79%|███████▊ | 37/47 [00:07<00:02, 4.91it/s]
81%|████████ | 38/47 [00:07<00:01, 4.91it/s]
83%|████████▎ | 39/47 [00:07<00:01, 4.92it/s]
85%|████████▌ | 40/47 [00:08<00:01, 4.92it/s]
87%|████████▋ | 41/47 [00:08<00:01, 4.91it/s]
89%|████████▉ | 42/47 [00:08<00:01, 4.86it/s]
91%|█████████▏| 43/47 [00:08<00:00, 4.87it/s]
94%|█████████▎| 44/47 [00:08<00:00, 4.89it/s]
96%|█████████▌| 45/47 [00:09<00:00, 4.91it/s]
98%|█████████▊| 46/47 [00:09<00:00, 4.92it/s]
98%|█████████▊| 46/47 [00:09<00:00, 4.91it/s]
0%| | 0/15 [00:00<?, ?it/s]
7%|▋ | 1/15 [00:00<00:03, 4.33it/s]
13%|█▎ | 2/15 [00:00<00:03, 4.32it/s]
20%|██ | 3/15 [00:00<00:02, 4.32it/s]
27%|██▋ | 4/15 [00:00<00:02, 4.31it/s]
33%|███▎ | 5/15 [00:01<00:02, 4.31it/s]
40%|████ | 6/15 [00:01<00:02, 4.31it/s]
47%|████▋ | 7/15 [00:01<00:01, 4.31it/s]
53%|█████▎ | 8/15 [00:01<00:01, 4.31it/s]
60%|██████ | 9/15 [00:02<00:01, 4.30it/s]
67%|██████▋ | 10/15 [00:02<00:01, 4.30it/s]
73%|███████▎ | 11/15 [00:02<00:00, 4.30it/s]
80%|████████ | 12/15 [00:02<00:00, 4.30it/s]
87%|████████▋ | 13/15 [00:03<00:00, 4.30it/s]
93%|█████████▎| 14/15 [00:03<00:00, 4.31it/s]
100%|██████████| 15/15 [00:03<00:00, 4.31it/s]
100%|██████████| 15/15 [00:03<00:00, 4.31it/s]