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/IfYdW0q5YMRU1djC3KhGk9H59v8Qns8jkP6bN5DDAxZmEMMD/house.png",
scale: 9,
steps: 20,
prompt: "a modernist house in a nice landscape",
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: "seg",
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/IfYdW0q5YMRU1djC3KhGk9H59v8Qns8jkP6bN5DDAxZmEMMD/house.png",
"scale": 9,
"steps": 20,
"prompt": "a modernist house in a nice landscape",
"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": "seg",
"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/IfYdW0q5YMRU1djC3KhGk9H59v8Qns8jkP6bN5DDAxZmEMMD/house.png",
"scale": 9,
"steps": 20,
"prompt": "a modernist house in a nice landscape",
"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": "seg",
"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-17T20:00:26.608566Z",
"created_at": "2023-04-17T20:00:22.448028Z",
"data_removed": false,
"error": null,
"id": "zikhl4ldcvfqjdwhwoku6raxfe",
"input": {
"image": "https://replicate.delivery/pbxt/IfYdW0q5YMRU1djC3KhGk9H59v8Qns8jkP6bN5DDAxZmEMMD/house.png",
"scale": 9,
"steps": 20,
"prompt": "a modernist house in a nice landscape",
"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": "seg",
"num_samples": "1",
"low_threshold": 100,
"high_threshold": 200,
"image_resolution": "512"
},
"logs": "Using seed: 7308\n 0%| | 0/20 [00:00<?, ?it/s]\n 10%|█ | 2/20 [00:00<00:01, 10.80it/s]\n 20%|██ | 4/20 [00:00<00:01, 11.10it/s]\n 30%|███ | 6/20 [00:00<00:01, 11.25it/s]\n 40%|████ | 8/20 [00:00<00:01, 11.29it/s]\n 50%|█████ | 10/20 [00:00<00:00, 11.34it/s]\n 60%|██████ | 12/20 [00:01<00:00, 11.39it/s]\n 70%|███████ | 14/20 [00:01<00:00, 11.45it/s]\n 80%|████████ | 16/20 [00:01<00:00, 11.43it/s]\n 90%|█████████ | 18/20 [00:01<00:00, 11.29it/s]\n100%|██████████| 20/20 [00:01<00:00, 11.12it/s]\n100%|██████████| 20/20 [00:01<00:00, 11.24it/s]",
"metrics": {
"predict_time": 4.050194,
"total_time": 4.160538
},
"output": [
"https://replicate.delivery/pbxt/LbuBZ3QNlt7QO9O9c9BeYDeKCu2RsOcsO5JYyEr55lwZd1yQA/out-0.png"
],
"started_at": "2023-04-17T20:00:22.558372Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/zikhl4ldcvfqjdwhwoku6raxfe",
"cancel": "https://api.replicate.com/v1/predictions/zikhl4ldcvfqjdwhwoku6raxfe/cancel"
},
"version": "bc5c323ec65c090856ad3bc6da609b5b47d7ede9c367b1f17c372d7563bd0218"
}
Using seed: 7308
0%| | 0/20 [00:00<?, ?it/s]
10%|█ | 2/20 [00:00<00:01, 10.80it/s]
20%|██ | 4/20 [00:00<00:01, 11.10it/s]
30%|███ | 6/20 [00:00<00:01, 11.25it/s]
40%|████ | 8/20 [00:00<00:01, 11.29it/s]
50%|█████ | 10/20 [00:00<00:00, 11.34it/s]
60%|██████ | 12/20 [00:01<00:00, 11.39it/s]
70%|███████ | 14/20 [00:01<00:00, 11.45it/s]
80%|████████ | 16/20 [00:01<00:00, 11.43it/s]
90%|█████████ | 18/20 [00:01<00:00, 11.29it/s]
100%|██████████| 20/20 [00:01<00:00, 11.12it/s]
100%|██████████| 20/20 [00:01<00:00, 11.24it/s]