Readme
This model doesn't have a readme.
controlnet_v11p_sd15_inpainting demo
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 anotherjesse/controlnet-inpaint-test using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"anotherjesse/controlnet-inpaint-test:3a294336beb5dcaba6c5baf1418058171298d559e4eef8dafed1e0a8c3594984",
{
input: {
mask: "https://replicate.delivery/pbxt/J70YfPyVE2xFVDHK0kdmMhiuaNrKxOBnDbMzvC6SfbCv2iWs/mask.png",
width: 512,
height: 512,
prompt: "a handsome man with ray-ban sunglasses",
scheduler: "DPMSolverMultistep",
num_outputs: 1,
control_image: "https://replicate.delivery/pbxt/J70YfER9vhcJsFsJ2Jw5MAdC97mB97bNrh7eU84t7XEkaCpa/control.png",
guidance_scale: 7.5,
num_inference_steps: 50,
disable_safety_check: false
}
}
);
// 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 anotherjesse/controlnet-inpaint-test using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"anotherjesse/controlnet-inpaint-test:3a294336beb5dcaba6c5baf1418058171298d559e4eef8dafed1e0a8c3594984",
input={
"mask": "https://replicate.delivery/pbxt/J70YfPyVE2xFVDHK0kdmMhiuaNrKxOBnDbMzvC6SfbCv2iWs/mask.png",
"width": 512,
"height": 512,
"prompt": "a handsome man with ray-ban sunglasses",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"control_image": "https://replicate.delivery/pbxt/J70YfER9vhcJsFsJ2Jw5MAdC97mB97bNrh7eU84t7XEkaCpa/control.png",
"guidance_scale": 7.5,
"num_inference_steps": 50,
"disable_safety_check": False
}
)
# The anotherjesse/controlnet-inpaint-test model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/anotherjesse/controlnet-inpaint-test/api#output-schema
print(item)
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 anotherjesse/controlnet-inpaint-test 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": "anotherjesse/controlnet-inpaint-test:3a294336beb5dcaba6c5baf1418058171298d559e4eef8dafed1e0a8c3594984",
"input": {
"mask": "https://replicate.delivery/pbxt/J70YfPyVE2xFVDHK0kdmMhiuaNrKxOBnDbMzvC6SfbCv2iWs/mask.png",
"width": 512,
"height": 512,
"prompt": "a handsome man with ray-ban sunglasses",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"control_image": "https://replicate.delivery/pbxt/J70YfER9vhcJsFsJ2Jw5MAdC97mB97bNrh7eU84t7XEkaCpa/control.png",
"guidance_scale": 7.5,
"num_inference_steps": 50,
"disable_safety_check": false
}
}' \
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
{
"completed_at": "2023-07-04T04:03:55.972789Z",
"created_at": "2023-07-04T04:01:58.017394Z",
"data_removed": false,
"error": null,
"id": "sqp5j2tbvaxp4ddbmgemctdrpa",
"input": {
"mask": "https://replicate.delivery/pbxt/J70YfPyVE2xFVDHK0kdmMhiuaNrKxOBnDbMzvC6SfbCv2iWs/mask.png",
"width": 512,
"height": 512,
"prompt": "a handsome man with ray-ban sunglasses",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"control_image": "https://replicate.delivery/pbxt/J70YfER9vhcJsFsJ2Jw5MAdC97mB97bNrh7eU84t7XEkaCpa/control.png",
"guidance_scale": 7.5,
"num_inference_steps": 50
},
"logs": "Using ControlNet inpaint\n(512, 512, 3)\n(512, 512)\nUsing seed: 8466\n/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/diffusers/configuration_utils.py:135: FutureWarning: Accessing config attribute `use_karras_sigmas` directly via 'HeunDiscreteScheduler' object attribute is deprecated. Please access 'use_karras_sigmas' over 'HeunDiscreteScheduler's config object instead, e.g. 'scheduler.config.use_karras_sigmas'.\ndeprecate(\"direct config name access\", \"1.0.0\", deprecation_message, standard_warn=False)\nparsed prompt: Conjunction:[FlattenedPrompt:[Fragment:'a handsome man with ray-ban sunglasses'@1.0]] | type AND | weights [1.0] | loras []\n/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/diffusers/image_processor.py:204: FutureWarning: Passing `image` as torch tensor with value range in [-1,1] is deprecated. The expected value range for image tensor is [0,1] when passing as pytorch tensor or numpy Array. You passed `image` with value range [-1.0,1.0]\nwarnings.warn(\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:00<00:07, 6.25it/s]\n 8%|▊ | 4/50 [00:00<00:02, 15.66it/s]\n 14%|█▍ | 7/50 [00:00<00:02, 19.33it/s]\n 20%|██ | 10/50 [00:00<00:01, 21.16it/s]\n 26%|██▌ | 13/50 [00:00<00:01, 22.23it/s]\n 32%|███▏ | 16/50 [00:00<00:01, 22.89it/s]\n 38%|███▊ | 19/50 [00:00<00:01, 23.32it/s]\n 44%|████▍ | 22/50 [00:01<00:01, 23.60it/s]\n 50%|█████ | 25/50 [00:01<00:01, 23.79it/s]\n 56%|█████▌ | 28/50 [00:01<00:00, 23.91it/s]\n 62%|██████▏ | 31/50 [00:01<00:00, 24.00it/s]\n 68%|██████▊ | 34/50 [00:01<00:00, 24.06it/s]\n 74%|███████▍ | 37/50 [00:01<00:00, 24.11it/s]\n 80%|████████ | 40/50 [00:01<00:00, 24.13it/s]\n 86%|████████▌ | 43/50 [00:01<00:00, 24.13it/s]\n 92%|█████████▏| 46/50 [00:02<00:00, 24.14it/s]\n 98%|█████████▊| 49/50 [00:02<00:00, 24.14it/s]\n100%|██████████| 50/50 [00:02<00:00, 22.87it/s]",
"metrics": {
"predict_time": 5.72184,
"total_time": 117.955395
},
"output": [
"https://replicate.delivery/pbxt/4tjRIiRkYTqGNBS2fFVsDFxOh62LfmODwyCMKekTGcrUhpYiA/seed-8466.png"
],
"started_at": "2023-07-04T04:03:50.250949Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/sqp5j2tbvaxp4ddbmgemctdrpa",
"cancel": "https://api.replicate.com/v1/predictions/sqp5j2tbvaxp4ddbmgemctdrpa/cancel"
},
"version": "3a294336beb5dcaba6c5baf1418058171298d559e4eef8dafed1e0a8c3594984"
}
Using ControlNet inpaint
(512, 512, 3)
(512, 512)
Using seed: 8466
/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/diffusers/configuration_utils.py:135: FutureWarning: Accessing config attribute `use_karras_sigmas` directly via 'HeunDiscreteScheduler' object attribute is deprecated. Please access 'use_karras_sigmas' over 'HeunDiscreteScheduler's config object instead, e.g. 'scheduler.config.use_karras_sigmas'.
deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False)
parsed prompt: Conjunction:[FlattenedPrompt:[Fragment:'a handsome man with ray-ban sunglasses'@1.0]] | type AND | weights [1.0] | loras []
/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/diffusers/image_processor.py:204: FutureWarning: Passing `image` as torch tensor with value range in [-1,1] is deprecated. The expected value range for image tensor is [0,1] when passing as pytorch tensor or numpy Array. You passed `image` with value range [-1.0,1.0]
warnings.warn(
0%| | 0/50 [00:00<?, ?it/s]
2%|▏ | 1/50 [00:00<00:07, 6.25it/s]
8%|▊ | 4/50 [00:00<00:02, 15.66it/s]
14%|█▍ | 7/50 [00:00<00:02, 19.33it/s]
20%|██ | 10/50 [00:00<00:01, 21.16it/s]
26%|██▌ | 13/50 [00:00<00:01, 22.23it/s]
32%|███▏ | 16/50 [00:00<00:01, 22.89it/s]
38%|███▊ | 19/50 [00:00<00:01, 23.32it/s]
44%|████▍ | 22/50 [00:01<00:01, 23.60it/s]
50%|█████ | 25/50 [00:01<00:01, 23.79it/s]
56%|█████▌ | 28/50 [00:01<00:00, 23.91it/s]
62%|██████▏ | 31/50 [00:01<00:00, 24.00it/s]
68%|██████▊ | 34/50 [00:01<00:00, 24.06it/s]
74%|███████▍ | 37/50 [00:01<00:00, 24.11it/s]
80%|████████ | 40/50 [00:01<00:00, 24.13it/s]
86%|████████▌ | 43/50 [00:01<00:00, 24.13it/s]
92%|█████████▏| 46/50 [00:02<00:00, 24.14it/s]
98%|█████████▊| 49/50 [00:02<00:00, 24.14it/s]
100%|██████████| 50/50 [00:02<00:00, 22.87it/s]
This model costs approximately $0.029 to run on Replicate, or 34 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.
This model runs on Nvidia A100 (80GB) GPU hardware. Predictions typically complete within 21 seconds.
This model doesn't have a readme.
This 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 costs approximately $0.029 to run on Replicate, but this varies depending on your inputs. View more.
Choose a file from your machine
Hint: you can also drag files onto the input
Choose a file from your machine
Hint: you can also drag files onto the input
Using ControlNet inpaint
(512, 512, 3)
(512, 512)
Using seed: 8466
/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/diffusers/configuration_utils.py:135: FutureWarning: Accessing config attribute `use_karras_sigmas` directly via 'HeunDiscreteScheduler' object attribute is deprecated. Please access 'use_karras_sigmas' over 'HeunDiscreteScheduler's config object instead, e.g. 'scheduler.config.use_karras_sigmas'.
deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False)
parsed prompt: Conjunction:[FlattenedPrompt:[Fragment:'a handsome man with ray-ban sunglasses'@1.0]] | type AND | weights [1.0] | loras []
/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/diffusers/image_processor.py:204: FutureWarning: Passing `image` as torch tensor with value range in [-1,1] is deprecated. The expected value range for image tensor is [0,1] when passing as pytorch tensor or numpy Array. You passed `image` with value range [-1.0,1.0]
warnings.warn(
0%| | 0/50 [00:00<?, ?it/s]
2%|▏ | 1/50 [00:00<00:07, 6.25it/s]
8%|▊ | 4/50 [00:00<00:02, 15.66it/s]
14%|█▍ | 7/50 [00:00<00:02, 19.33it/s]
20%|██ | 10/50 [00:00<00:01, 21.16it/s]
26%|██▌ | 13/50 [00:00<00:01, 22.23it/s]
32%|███▏ | 16/50 [00:00<00:01, 22.89it/s]
38%|███▊ | 19/50 [00:00<00:01, 23.32it/s]
44%|████▍ | 22/50 [00:01<00:01, 23.60it/s]
50%|█████ | 25/50 [00:01<00:01, 23.79it/s]
56%|█████▌ | 28/50 [00:01<00:00, 23.91it/s]
62%|██████▏ | 31/50 [00:01<00:00, 24.00it/s]
68%|██████▊ | 34/50 [00:01<00:00, 24.06it/s]
74%|███████▍ | 37/50 [00:01<00:00, 24.11it/s]
80%|████████ | 40/50 [00:01<00:00, 24.13it/s]
86%|████████▌ | 43/50 [00:01<00:00, 24.13it/s]
92%|█████████▏| 46/50 [00:02<00:00, 24.14it/s]
98%|█████████▊| 49/50 [00:02<00:00, 24.14it/s]
100%|██████████| 50/50 [00:02<00:00, 22.87it/s]