{
"add_more_detail_lora_scale": 0.5,
"brightness_conditioning_scale": 1,
"color_temprature_slider_lora_weight": 0,
"detail_tweaker_lora_weight": 0,
"disable_safety_check": false,
"epi_noise_offset_lora_weight": 0,
"eta": 0,
"film_grain_lora_weight": 0,
"guess_mode": false,
"guidance_scale": 7,
"img2img_strength": 0.5,
"inpainting_conditioning_scale": 1,
"ip_adapter_ckpt": "ip-adapter_sd15.bin",
"ip_adapter_weight": 1,
"lineart_conditioning_scale": 1,
"max_height": 512,
"max_width": 512,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_inference_steps": 20,
"num_outputs": 1,
"prompt": "jungle",
"scheduler": "DDIM",
"scribble_conditioning_scale": 1,
"sorted_controlnets": "tile, inpainting, lineart",
"tile_conditioning_scale": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cXL**********************************
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 usamaehsan/multi-controlnet-x-ip-adapter-vision-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"usamaehsan/multi-controlnet-x-ip-adapter-vision-v2:7a904d90b4a018eeb8e47dd850470ef651a6f4563fa20dc8b62deb0f344cb13a",
{
input: {
add_more_detail_lora_scale: 0.5,
brightness_conditioning_scale: 1,
color_temprature_slider_lora_weight: 0,
detail_tweaker_lora_weight: 0,
disable_safety_check: false,
epi_noise_offset_lora_weight: 0,
eta: 0,
film_grain_lora_weight: 0,
guess_mode: false,
guidance_scale: 7,
img2img_strength: 0.5,
inpainting_conditioning_scale: 1,
ip_adapter_ckpt: "ip-adapter_sd15.bin",
ip_adapter_weight: 1,
lineart_conditioning_scale: 1,
max_height: 512,
max_width: 512,
negative_prompt: "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
num_inference_steps: 20,
num_outputs: 1,
prompt: "jungle",
scheduler: "DDIM",
scribble_conditioning_scale: 1,
sorted_controlnets: "tile, inpainting, lineart",
tile_conditioning_scale: 1
}
}
);
// 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_cXL**********************************
This is your API token. Keep it to yourself.
import replicate
Run usamaehsan/multi-controlnet-x-ip-adapter-vision-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"usamaehsan/multi-controlnet-x-ip-adapter-vision-v2:7a904d90b4a018eeb8e47dd850470ef651a6f4563fa20dc8b62deb0f344cb13a",
input={
"add_more_detail_lora_scale": 0.5,
"brightness_conditioning_scale": 1,
"color_temprature_slider_lora_weight": 0,
"detail_tweaker_lora_weight": 0,
"disable_safety_check": False,
"epi_noise_offset_lora_weight": 0,
"eta": 0,
"film_grain_lora_weight": 0,
"guess_mode": False,
"guidance_scale": 7,
"img2img_strength": 0.5,
"inpainting_conditioning_scale": 1,
"ip_adapter_ckpt": "ip-adapter_sd15.bin",
"ip_adapter_weight": 1,
"lineart_conditioning_scale": 1,
"max_height": 512,
"max_width": 512,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_inference_steps": 20,
"num_outputs": 1,
"prompt": "jungle",
"scheduler": "DDIM",
"scribble_conditioning_scale": 1,
"sorted_controlnets": "tile, inpainting, lineart",
"tile_conditioning_scale": 1
}
)
# 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_cXL**********************************
This is your API token. Keep it to yourself.
Run usamaehsan/multi-controlnet-x-ip-adapter-vision-v2 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": "usamaehsan/multi-controlnet-x-ip-adapter-vision-v2:7a904d90b4a018eeb8e47dd850470ef651a6f4563fa20dc8b62deb0f344cb13a",
"input": {
"add_more_detail_lora_scale": 0.5,
"brightness_conditioning_scale": 1,
"color_temprature_slider_lora_weight": 0,
"detail_tweaker_lora_weight": 0,
"disable_safety_check": false,
"epi_noise_offset_lora_weight": 0,
"eta": 0,
"film_grain_lora_weight": 0,
"guess_mode": false,
"guidance_scale": 7,
"img2img_strength": 0.5,
"inpainting_conditioning_scale": 1,
"ip_adapter_ckpt": "ip-adapter_sd15.bin",
"ip_adapter_weight": 1,
"lineart_conditioning_scale": 1,
"max_height": 512,
"max_width": 512,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_inference_steps": 20,
"num_outputs": 1,
"prompt": "jungle",
"scheduler": "DDIM",
"scribble_conditioning_scale": 1,
"sorted_controlnets": "tile, inpainting, lineart",
"tile_conditioning_scale": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ku3hmytbenh7kbild7unj7ccw4",
"model": "usamaehsan/multi-controlnet-x-ip-adapter-vision-v2",
"version": "7a904d90b4a018eeb8e47dd850470ef651a6f4563fa20dc8b62deb0f344cb13a",
"input": {
"add_more_detail_lora_scale": 0.5,
"brightness_conditioning_scale": 1,
"color_temprature_slider_lora_weight": 0,
"detail_tweaker_lora_weight": 0,
"disable_safety_check": false,
"epi_noise_offset_lora_weight": 0,
"eta": 0,
"film_grain_lora_weight": 0,
"guess_mode": false,
"guidance_scale": 7,
"img2img_strength": 0.5,
"inpainting_conditioning_scale": 1,
"ip_adapter_ckpt": "ip-adapter_sd15.bin",
"ip_adapter_weight": 1,
"lineart_conditioning_scale": 1,
"max_height": 512,
"max_width": 512,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"num_inference_steps": 20,
"num_outputs": 1,
"prompt": "jungle",
"scheduler": "DDIM",
"scribble_conditioning_scale": 1,
"sorted_controlnets": "tile, inpainting, lineart",
"tile_conditioning_scale": 1
},
"logs": "Time taken until build pipe: 0.00 seconds\nusing ip adapter:: example/cat.png\nloading ip adapter\nTime taken to load IP adapter model: 0.01 seconds\nTime taken to load image encoder model: 0.00 seconds\nTime taken to build pipe: 0.24 seconds\nTime taken to apply scheduler-- : 0.00 seconds\nTime taken to cuda-- : 0.00 seconds\nUsing seed: 25977\nTime taken until ip -- : 0.00 seconds\nTime taken to load ip-- : 2.16 seconds\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:04, 4.72it/s]\n 15%|█▌ | 3/20 [00:00<00:01, 9.93it/s]\n 25%|██▌ | 5/20 [00:00<00:01, 12.53it/s]\n 35%|███▌ | 7/20 [00:00<00:00, 14.09it/s]\n 45%|████▌ | 9/20 [00:00<00:00, 15.05it/s]\n 55%|█████▌ | 11/20 [00:00<00:00, 15.58it/s]\n 65%|██████▌ | 13/20 [00:00<00:00, 15.88it/s]\n 75%|███████▌ | 15/20 [00:01<00:00, 16.19it/s]\n 85%|████████▌ | 17/20 [00:01<00:00, 16.38it/s]\n 95%|█████████▌| 19/20 [00:01<00:00, 16.14it/s]\n100%|██████████| 20/20 [00:01<00:00, 14.73it/s]\nTime taken to generate image-- : 1.47 seconds\n/root/.pyenv/versions/3.9.18/lib/python3.9/site-packages/peft/tuners/lora/layer.py:595: UserWarning: Already unmerged. Nothing to do.\nwarnings.warn(\"Already unmerged. Nothing to do.\")\n/root/.pyenv/versions/3.9.18/lib/python3.9/site-packages/peft/tuners/lora/layer.py:256: UserWarning: Already unmerged. Nothing to do.\nwarnings.warn(\"Already unmerged. Nothing to do.\")",
"output": [
"https://replicate.delivery/pbxt/ZTKQ3LINbAZiMpJnOjtIUWreyPM62kXcpW0V33SAQ5qwC1MJA/output_0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-23T19:14:15.618963Z",
"started_at": "2024-02-23T19:17:49.448848Z",
"completed_at": "2024-02-23T19:17:54.685343Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ku3hmytbenh7kbild7unj7ccw4/cancel",
"get": "https://api.replicate.com/v1/predictions/ku3hmytbenh7kbild7unj7ccw4"
},
"metrics": {
"predict_time": 5.236495,
"total_time": 219.06638
}
}