cjwbw / stable-diffusion-v2-inpainting
stable-diffusion-v2-inpainting
- Public
- 178.5K runs
-
A100 (80GB)
Want to make some of these yourself?
Run this modelstable-diffusion-v2-inpainting
{
"mask": "https://replicate.delivery/pbxt/HszfSoPGhMEvXf9Gf5gA564aMMyuki3TLSlQQmCepokDJy47/mask.png",
"image": "https://replicate.delivery/pbxt/HszfS11BnkFTWHKv6sa5kQgrGGcLk0r1ihgUVAZp2bQJ0Yq9/dog.png",
"prompt": "face of a ginger cat, high resolution, sitting on a park bench",
"num_outputs": 1,
"guidance_scale": 7.5,
"prompt_strength": 0.8,
"num_inference_steps": 50
}
npm install replicate
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run cjwbw/stable-diffusion-v2-inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cjwbw/stable-diffusion-v2-inpainting:f9bb0632bfdceb83196e85521b9b55895f8ff3d1d3b487fd1973210c0eb30bec",
{
input: {
mask: "https://replicate.delivery/pbxt/HszfSoPGhMEvXf9Gf5gA564aMMyuki3TLSlQQmCepokDJy47/mask.png",
image: "https://replicate.delivery/pbxt/HszfS11BnkFTWHKv6sa5kQgrGGcLk0r1ihgUVAZp2bQJ0Yq9/dog.png",
prompt: "face of a ginger cat, high resolution, sitting on a park bench",
num_outputs: 1,
guidance_scale: 7.5,
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
import replicate
Run cjwbw/stable-diffusion-v2-inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cjwbw/stable-diffusion-v2-inpainting:f9bb0632bfdceb83196e85521b9b55895f8ff3d1d3b487fd1973210c0eb30bec",
input={
"mask": "https://replicate.delivery/pbxt/HszfSoPGhMEvXf9Gf5gA564aMMyuki3TLSlQQmCepokDJy47/mask.png",
"image": "https://replicate.delivery/pbxt/HszfS11BnkFTWHKv6sa5kQgrGGcLk0r1ihgUVAZp2bQJ0Yq9/dog.png",
"prompt": "face of a ginger cat, high resolution, sitting on a park bench",
"num_outputs": 1,
"guidance_scale": 7.5,
"prompt_strength": 0.8,
"num_inference_steps": 50
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/stable-diffusion-v2-inpainting 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": "cjwbw/stable-diffusion-v2-inpainting:f9bb0632bfdceb83196e85521b9b55895f8ff3d1d3b487fd1973210c0eb30bec",
"input": {
"mask": "https://replicate.delivery/pbxt/HszfSoPGhMEvXf9Gf5gA564aMMyuki3TLSlQQmCepokDJy47/mask.png",
"image": "https://replicate.delivery/pbxt/HszfS11BnkFTWHKv6sa5kQgrGGcLk0r1ihgUVAZp2bQJ0Yq9/dog.png",
"prompt": "face of a ginger cat, high resolution, sitting on a park bench",
"num_outputs": 1,
"guidance_scale": 7.5,
"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.
{
"completed_at": "2022-12-02T00:24:09.794366Z",
"created_at": "2022-12-02T00:24:05.569413Z",
"data_removed": false,
"error": null,
"id": "bjpmr5hqxjd5ri2kynk5ebtgaa",
"input": {
"mask": "https://replicate.delivery/pbxt/HszfSoPGhMEvXf9Gf5gA564aMMyuki3TLSlQQmCepokDJy47/mask.png",
"image": "https://replicate.delivery/pbxt/HszfS11BnkFTWHKv6sa5kQgrGGcLk0r1ihgUVAZp2bQJ0Yq9/dog.png",
"prompt": "face of a ginger cat, high resolution, sitting on a park bench",
"num_outputs": 1,
"guidance_scale": 7.5,
"prompt_strength": 0.8,
"num_inference_steps": 50
},
"logs": "Using seed: 15524\n 0%| | 0/51 [00:00<?, ?it/s]\n 4%|▍ | 2/51 [00:00<00:03, 14.35it/s]\n 8%|▊ | 4/51 [00:00<00:02, 15.70it/s]\n 12%|█▏ | 6/51 [00:00<00:02, 16.20it/s]\n 16%|█▌ | 8/51 [00:00<00:02, 16.51it/s]\n 20%|█▉ | 10/51 [00:00<00:02, 16.53it/s]\n 24%|██▎ | 12/51 [00:00<00:02, 16.22it/s]\n 27%|██▋ | 14/51 [00:00<00:02, 16.36it/s]\n 31%|███▏ | 16/51 [00:00<00:02, 16.47it/s]\n 35%|███▌ | 18/51 [00:01<00:02, 16.50it/s]\n 39%|███▉ | 20/51 [00:01<00:01, 16.54it/s]\n 43%|████▎ | 22/51 [00:01<00:01, 16.52it/s]\n 47%|████▋ | 24/51 [00:01<00:01, 16.52it/s]\n 51%|█████ | 26/51 [00:01<00:01, 16.54it/s]\n 55%|█████▍ | 28/51 [00:01<00:01, 16.37it/s]\n 59%|█████▉ | 30/51 [00:01<00:01, 16.47it/s]\n 63%|██████▎ | 32/51 [00:01<00:01, 16.54it/s]\n 67%|██████▋ | 34/51 [00:02<00:01, 16.58it/s]\n 71%|███████ | 36/51 [00:02<00:00, 16.56it/s]\n 75%|███████▍ | 38/51 [00:02<00:00, 16.54it/s]\n 78%|███████▊ | 40/51 [00:02<00:00, 16.59it/s]\n 82%|████████▏ | 42/51 [00:02<00:00, 16.65it/s]\n 86%|████████▋ | 44/51 [00:02<00:00, 16.65it/s]\n 90%|█████████ | 46/51 [00:02<00:00, 16.66it/s]\n 94%|█████████▍| 48/51 [00:02<00:00, 16.68it/s]\n 98%|█████████▊| 50/51 [00:03<00:00, 16.68it/s]\n100%|██████████| 51/51 [00:03<00:00, 16.49it/s]",
"metrics": {
"predict_time": 4.186986,
"total_time": 4.224953
},
"output": [
"https://replicate.delivery/pbxt/R0kqaA8PUMarFx2SoelD46bYGO8MwPUx1XiMUdq82YiUv3CIA/out-0.png"
],
"started_at": "2022-12-02T00:24:05.607380Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/bjpmr5hqxjd5ri2kynk5ebtgaa",
"cancel": "https://api.replicate.com/v1/predictions/bjpmr5hqxjd5ri2kynk5ebtgaa/cancel"
},
"version": "f9bb0632bfdceb83196e85521b9b55895f8ff3d1d3b487fd1973210c0eb30bec"
}
Using seed: 15524
0%| | 0/51 [00:00<?, ?it/s]
4%|▍ | 2/51 [00:00<00:03, 14.35it/s]
8%|▊ | 4/51 [00:00<00:02, 15.70it/s]
12%|█▏ | 6/51 [00:00<00:02, 16.20it/s]
16%|█▌ | 8/51 [00:00<00:02, 16.51it/s]
20%|█▉ | 10/51 [00:00<00:02, 16.53it/s]
24%|██▎ | 12/51 [00:00<00:02, 16.22it/s]
27%|██▋ | 14/51 [00:00<00:02, 16.36it/s]
31%|███▏ | 16/51 [00:00<00:02, 16.47it/s]
35%|███▌ | 18/51 [00:01<00:02, 16.50it/s]
39%|███▉ | 20/51 [00:01<00:01, 16.54it/s]
43%|████▎ | 22/51 [00:01<00:01, 16.52it/s]
47%|████▋ | 24/51 [00:01<00:01, 16.52it/s]
51%|█████ | 26/51 [00:01<00:01, 16.54it/s]
55%|█████▍ | 28/51 [00:01<00:01, 16.37it/s]
59%|█████▉ | 30/51 [00:01<00:01, 16.47it/s]
63%|██████▎ | 32/51 [00:01<00:01, 16.54it/s]
67%|██████▋ | 34/51 [00:02<00:01, 16.58it/s]
71%|███████ | 36/51 [00:02<00:00, 16.56it/s]
75%|███████▍ | 38/51 [00:02<00:00, 16.54it/s]
78%|███████▊ | 40/51 [00:02<00:00, 16.59it/s]
82%|████████▏ | 42/51 [00:02<00:00, 16.65it/s]
86%|████████▋ | 44/51 [00:02<00:00, 16.65it/s]
90%|█████████ | 46/51 [00:02<00:00, 16.66it/s]
94%|█████████▍| 48/51 [00:02<00:00, 16.68it/s]
98%|█████████▊| 50/51 [00:03<00:00, 16.68it/s]
100%|██████████| 51/51 [00:03<00:00, 16.49it/s]
Want to make some of these yourself?
Run this modelThis model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
This model runs on A100 (80GB). View more.
Using seed: 15524
0%| | 0/51 [00:00<?, ?it/s]
4%|▍ | 2/51 [00:00<00:03, 14.35it/s]
8%|▊ | 4/51 [00:00<00:02, 15.70it/s]
12%|█▏ | 6/51 [00:00<00:02, 16.20it/s]
16%|█▌ | 8/51 [00:00<00:02, 16.51it/s]
20%|█▉ | 10/51 [00:00<00:02, 16.53it/s]
24%|██▎ | 12/51 [00:00<00:02, 16.22it/s]
27%|██▋ | 14/51 [00:00<00:02, 16.36it/s]
31%|███▏ | 16/51 [00:00<00:02, 16.47it/s]
35%|███▌ | 18/51 [00:01<00:02, 16.50it/s]
39%|███▉ | 20/51 [00:01<00:01, 16.54it/s]
43%|████▎ | 22/51 [00:01<00:01, 16.52it/s]
47%|████▋ | 24/51 [00:01<00:01, 16.52it/s]
51%|█████ | 26/51 [00:01<00:01, 16.54it/s]
55%|█████▍ | 28/51 [00:01<00:01, 16.37it/s]
59%|█████▉ | 30/51 [00:01<00:01, 16.47it/s]
63%|██████▎ | 32/51 [00:01<00:01, 16.54it/s]
67%|██████▋ | 34/51 [00:02<00:01, 16.58it/s]
71%|███████ | 36/51 [00:02<00:00, 16.56it/s]
75%|███████▍ | 38/51 [00:02<00:00, 16.54it/s]
78%|███████▊ | 40/51 [00:02<00:00, 16.59it/s]
82%|████████▏ | 42/51 [00:02<00:00, 16.65it/s]
86%|████████▋ | 44/51 [00:02<00:00, 16.65it/s]
90%|█████████ | 46/51 [00:02<00:00, 16.66it/s]
94%|█████████▍| 48/51 [00:02<00:00, 16.68it/s]
98%|█████████▊| 50/51 [00:03<00:00, 16.68it/s]
100%|██████████| 51/51 [00:03<00:00, 16.49it/s]