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.
rossjillian /controlnet_1-1:bc5c323e
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run rossjillian/controlnet_1-1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"rossjillian/controlnet_1-1:bc5c323ec65c090856ad3bc6da609b5b47d7ede9c367b1f17c372d7563bd0218",
{
input: {
eta: 0,
image: "https://replicate.delivery/pbxt/IfYcADnrquHyFiJaLur1fgv6P4ZxKUyGgpuEWPamUAlF1VQI/user_1.png",
scale: 9,
steps: 20,
prompt: "a photo of a brightly colored turtle",
a_prompt: "Best quality, extremely detailed",
n_prompt: "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
structure: "scribble",
num_samples: "1",
low_threshold: 100,
high_threshold: 200,
image_resolution: "512"
}
}
);
// 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 rossjillian/controlnet_1-1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"rossjillian/controlnet_1-1:bc5c323ec65c090856ad3bc6da609b5b47d7ede9c367b1f17c372d7563bd0218",
input={
"eta": 0,
"image": "https://replicate.delivery/pbxt/IfYcADnrquHyFiJaLur1fgv6P4ZxKUyGgpuEWPamUAlF1VQI/user_1.png",
"scale": 9,
"steps": 20,
"prompt": "a photo of a brightly colored turtle",
"a_prompt": "Best quality, extremely detailed",
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"structure": "scribble",
"num_samples": "1",
"low_threshold": 100,
"high_threshold": 200,
"image_resolution": "512"
}
)
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 rossjillian/controlnet_1-1 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": "rossjillian/controlnet_1-1:bc5c323ec65c090856ad3bc6da609b5b47d7ede9c367b1f17c372d7563bd0218",
"input": {
"eta": 0,
"image": "https://replicate.delivery/pbxt/IfYcADnrquHyFiJaLur1fgv6P4ZxKUyGgpuEWPamUAlF1VQI/user_1.png",
"scale": 9,
"steps": 20,
"prompt": "a photo of a brightly colored turtle",
"a_prompt": "Best quality, extremely detailed",
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"structure": "scribble",
"num_samples": "1",
"low_threshold": 100,
"high_threshold": 200,
"image_resolution": "512"
}
}' \
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-04-17T19:58:59.279781Z",
"created_at": "2023-04-17T19:58:55.903974Z",
"data_removed": false,
"error": null,
"id": "awnprqrkw5cifjzqr4fjkznopm",
"input": {
"image": "https://replicate.delivery/pbxt/IfYcADnrquHyFiJaLur1fgv6P4ZxKUyGgpuEWPamUAlF1VQI/user_1.png",
"scale": 9,
"steps": 20,
"prompt": "a photo of a brightly colored turtle",
"a_prompt": "Best quality, extremely detailed",
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"structure": "scribble",
"num_samples": "1",
"low_threshold": 100,
"high_threshold": 200,
"image_resolution": "512"
},
"logs": "Using seed: 64484\n 0%| | 0/20 [00:00<?, ?it/s]\n 10%|█ | 2/20 [00:00<00:01, 11.24it/s]\n 20%|██ | 4/20 [00:00<00:01, 11.31it/s]\n 30%|███ | 6/20 [00:00<00:01, 11.45it/s]\n 40%|████ | 8/20 [00:00<00:01, 11.52it/s]\n 50%|█████ | 10/20 [00:00<00:00, 11.52it/s]\n 60%|██████ | 12/20 [00:01<00:00, 11.50it/s]\n 70%|███████ | 14/20 [00:01<00:00, 11.56it/s]\n 80%|████████ | 16/20 [00:01<00:00, 11.56it/s]\n 90%|█████████ | 18/20 [00:01<00:00, 11.60it/s]\n100%|██████████| 20/20 [00:01<00:00, 11.61it/s]\n100%|██████████| 20/20 [00:01<00:00, 11.54it/s]",
"metrics": {
"predict_time": 3.269991,
"total_time": 3.375807
},
"output": [
"https://replicate.delivery/pbxt/X3SiWhOcZfwAYq4bN12iio33PjJCdTmNEoLfXEgnz3GCc1yQA/out-0.png"
],
"started_at": "2023-04-17T19:58:56.009790Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/awnprqrkw5cifjzqr4fjkznopm",
"cancel": "https://api.replicate.com/v1/predictions/awnprqrkw5cifjzqr4fjkznopm/cancel"
},
"version": "bc5c323ec65c090856ad3bc6da609b5b47d7ede9c367b1f17c372d7563bd0218"
}
Using seed: 64484
0%| | 0/20 [00:00<?, ?it/s]
10%|█ | 2/20 [00:00<00:01, 11.24it/s]
20%|██ | 4/20 [00:00<00:01, 11.31it/s]
30%|███ | 6/20 [00:00<00:01, 11.45it/s]
40%|████ | 8/20 [00:00<00:01, 11.52it/s]
50%|█████ | 10/20 [00:00<00:00, 11.52it/s]
60%|██████ | 12/20 [00:01<00:00, 11.50it/s]
70%|███████ | 14/20 [00:01<00:00, 11.56it/s]
80%|████████ | 16/20 [00:01<00:00, 11.56it/s]
90%|█████████ | 18/20 [00:01<00:00, 11.60it/s]
100%|██████████| 20/20 [00:01<00:00, 11.61it/s]
100%|██████████| 20/20 [00:01<00:00, 11.54it/s]