typefile
{
"a_prompt": "Best quality, extremely detailed",
"autogenerated_prompt": true,
"ddim_steps": 20,
"high_threshold": 200,
"image": "https://replicate.delivery/pbxt/JREI44b9KCW78ynS9sH9je7wCckmEHcSF3EXwJBlhDhbh0jH/dog.png",
"image_upscaler": false,
"low_threshold": 100,
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_samples": 1,
"preprocessor_resolution": 512,
"prompt": "a dog in a bright sunshine jungle, hard lighting",
"scale": 9,
"strength": 1,
"structure": "canny"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_aLP**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zylim0702/controlnet-v1-1-multi using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zylim0702/controlnet-v1-1-multi:211486c3a33e26c7513c3ae4db00621f155bff401d3a241e260995e04bbbd88a",
{
input: {
a_prompt: "Best quality, extremely detailed",
autogenerated_prompt: true,
ddim_steps: 20,
high_threshold: 200,
image: "https://replicate.delivery/pbxt/JREI44b9KCW78ynS9sH9je7wCckmEHcSF3EXwJBlhDhbh0jH/dog.png",
image_upscaler: false,
low_threshold: 100,
n_prompt: "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
num_samples: 1,
preprocessor_resolution: 512,
prompt: "a dog in a bright sunshine jungle, hard lighting",
scale: 9,
strength: 1,
structure: "canny"
}
}
);
// 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=r8_aLP**********************************
This is your API token. Keep it to yourself.
import replicate
Run zylim0702/controlnet-v1-1-multi using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zylim0702/controlnet-v1-1-multi:211486c3a33e26c7513c3ae4db00621f155bff401d3a241e260995e04bbbd88a",
input={
"a_prompt": "Best quality, extremely detailed",
"autogenerated_prompt": True,
"ddim_steps": 20,
"high_threshold": 200,
"image": "https://replicate.delivery/pbxt/JREI44b9KCW78ynS9sH9je7wCckmEHcSF3EXwJBlhDhbh0jH/dog.png",
"image_upscaler": False,
"low_threshold": 100,
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_samples": 1,
"preprocessor_resolution": 512,
"prompt": "a dog in a bright sunshine jungle, hard lighting",
"scale": 9,
"strength": 1,
"structure": "canny"
}
)
# 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.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_aLP**********************************
This is your API token. Keep it to yourself.
Run zylim0702/controlnet-v1-1-multi 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": "zylim0702/controlnet-v1-1-multi:211486c3a33e26c7513c3ae4db00621f155bff401d3a241e260995e04bbbd88a",
"input": {
"a_prompt": "Best quality, extremely detailed",
"autogenerated_prompt": true,
"ddim_steps": 20,
"high_threshold": 200,
"image": "https://replicate.delivery/pbxt/JREI44b9KCW78ynS9sH9je7wCckmEHcSF3EXwJBlhDhbh0jH/dog.png",
"image_upscaler": false,
"low_threshold": 100,
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_samples": 1,
"preprocessor_resolution": 512,
"prompt": "a dog in a bright sunshine jungle, hard lighting",
"scale": 9,
"strength": 1,
"structure": "canny"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "tntmvudbhpfncycnoocai6z7xa",
"model": "zylim0702/controlnet-v1-1-multi",
"version": "211486c3a33e26c7513c3ae4db00621f155bff401d3a241e260995e04bbbd88a",
"input": {
"a_prompt": "Best quality, extremely detailed",
"autogenerated_prompt": true,
"ddim_steps": 20,
"high_threshold": 200,
"image": "https://replicate.delivery/pbxt/JREI44b9KCW78ynS9sH9je7wCckmEHcSF3EXwJBlhDhbh0jH/dog.png",
"image_upscaler": false,
"low_threshold": 100,
"n_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_samples": 1,
"preprocessor_resolution": 512,
"prompt": "a dog in a bright sunshine jungle, hard lighting",
"scale": 9,
"strength": 1,
"structure": "canny"
},
"logs": "0%| | 0/55 [00:00<?, ?it/s]\n 56%|█████▋ | 31/55 [00:00<00:00, 304.70it/s]\n100%|██████████| 55/55 [00:00<00:00, 309.42it/s]\na dog in a bright sunshine jungle, hard lighting, there is a dog sitting on a bench in a field, sitting on a bench, sitting on bench, sit on a bench, sitting on a park bench, happy dog, portrait, benches, portrait shot, award - winning pet photography, portrait image, sittin, a wooden, four legged, medium portrait, on a sunny day, at a park, peaceful mood\nUsing seed: 25123\nThe following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['sunny day, at a park, peaceful mood']\nThe following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['sunny day, at a park, peaceful mood']\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:05, 3.44it/s]\n 10%|█ | 2/20 [00:00<00:05, 3.43it/s]\n 15%|█▌ | 3/20 [00:00<00:04, 3.42it/s]\n 20%|██ | 4/20 [00:01<00:04, 3.41it/s]\n 25%|██▌ | 5/20 [00:01<00:04, 3.41it/s]\n 30%|███ | 6/20 [00:01<00:04, 3.41it/s]\n 35%|███▌ | 7/20 [00:02<00:03, 3.41it/s]\n 40%|████ | 8/20 [00:02<00:03, 3.41it/s]\n 45%|████▌ | 9/20 [00:02<00:03, 3.41it/s]\n 50%|█████ | 10/20 [00:02<00:02, 3.41it/s]\n 55%|█████▌ | 11/20 [00:03<00:02, 3.40it/s]\n 60%|██████ | 12/20 [00:03<00:02, 3.40it/s]\n 65%|██████▌ | 13/20 [00:03<00:02, 3.40it/s]\n 70%|███████ | 14/20 [00:04<00:01, 3.40it/s]\n 75%|███████▌ | 15/20 [00:04<00:01, 3.40it/s]\n 80%|████████ | 16/20 [00:04<00:01, 3.40it/s]\n 85%|████████▌ | 17/20 [00:04<00:00, 3.41it/s]\n 90%|█████████ | 18/20 [00:05<00:00, 3.42it/s]\n 95%|█████████▌| 19/20 [00:05<00:00, 3.42it/s]\n100%|██████████| 20/20 [00:05<00:00, 3.42it/s]\n100%|██████████| 20/20 [00:05<00:00, 3.41it/s]",
"output": [
"https://replicate.delivery/pbxt/kARY8cHjYeSXdyeeXaOsKlECvnhwD0ijD7MHYvP7X3NZZzeFB/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-31T01:13:09.043216Z",
"started_at": "2023-08-31T01:13:08.95776Z",
"completed_at": "2023-08-31T01:13:17.775722Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tntmvudbhpfncycnoocai6z7xa/cancel",
"get": "https://api.replicate.com/v1/predictions/tntmvudbhpfncycnoocai6z7xa"
},
"metrics": {
"predict_time": 8.817962,
"total_time": 8.732506
}
}
