{
"brightness_conditioning_scale": 1,
"disable_safety_check": true,
"eta": 0,
"guess_mode": false,
"guidance_scale": 8.72,
"inpainting_conditioning_scale": 1,
"ip_adapter_image": "https://replicate.delivery/pbxt/JvfJGnjAmUqqNLFm8OyfbOXynAQLvVOtgSrq2cWOWeAb2wZW/Cool-PC-Wallpapers-HD-2.jpg",
"ip_adapter_weight": 0.3,
"lineart_conditioning_scale": 1.2,
"lineart_image": "https://replicate.delivery/pbxt/JvfJGnmbU8uxfzsCeqLBCdEoeOQT09xZOAQLGbGLqyNYrrKc/output.png",
"max_height": 712,
"max_width": 712,
"negative_prompt": "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cat",
"scheduler": "K_EULER_ANCESTRAL",
"sorted_controlnets": "tile, inpainting, lineart",
"tile_conditioning_scale": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_I91**********************************
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/controlnet-x-majic-mix-realistic-x-ip-adapter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"usamaehsan/controlnet-x-majic-mix-realistic-x-ip-adapter:6871e1d728bb30a0b0490884932674303d7b35ba7e6aa18e668676cccbf9c41f",
{
input: {
brightness_conditioning_scale: 1,
disable_safety_check: true,
eta: 0,
guess_mode: false,
guidance_scale: 8.72,
inpainting_conditioning_scale: 1,
ip_adapter_image: "https://replicate.delivery/pbxt/JvfJGnjAmUqqNLFm8OyfbOXynAQLvVOtgSrq2cWOWeAb2wZW/Cool-PC-Wallpapers-HD-2.jpg",
ip_adapter_weight: 0.3,
lineart_conditioning_scale: 1.2,
lineart_image: "https://replicate.delivery/pbxt/JvfJGnmbU8uxfzsCeqLBCdEoeOQT09xZOAQLGbGLqyNYrrKc/output.png",
max_height: 712,
max_width: 712,
negative_prompt: "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
num_inference_steps: 30,
num_outputs: 1,
prompt: "cat",
scheduler: "K_EULER_ANCESTRAL",
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_I91**********************************
This is your API token. Keep it to yourself.
import replicate
Run usamaehsan/controlnet-x-majic-mix-realistic-x-ip-adapter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"usamaehsan/controlnet-x-majic-mix-realistic-x-ip-adapter:6871e1d728bb30a0b0490884932674303d7b35ba7e6aa18e668676cccbf9c41f",
input={
"brightness_conditioning_scale": 1,
"disable_safety_check": True,
"eta": 0,
"guess_mode": False,
"guidance_scale": 8.72,
"inpainting_conditioning_scale": 1,
"ip_adapter_image": "https://replicate.delivery/pbxt/JvfJGnjAmUqqNLFm8OyfbOXynAQLvVOtgSrq2cWOWeAb2wZW/Cool-PC-Wallpapers-HD-2.jpg",
"ip_adapter_weight": 0.3,
"lineart_conditioning_scale": 1.2,
"lineart_image": "https://replicate.delivery/pbxt/JvfJGnmbU8uxfzsCeqLBCdEoeOQT09xZOAQLGbGLqyNYrrKc/output.png",
"max_height": 712,
"max_width": 712,
"negative_prompt": "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cat",
"scheduler": "K_EULER_ANCESTRAL",
"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_I91**********************************
This is your API token. Keep it to yourself.
Run usamaehsan/controlnet-x-majic-mix-realistic-x-ip-adapter 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/controlnet-x-majic-mix-realistic-x-ip-adapter:6871e1d728bb30a0b0490884932674303d7b35ba7e6aa18e668676cccbf9c41f",
"input": {
"brightness_conditioning_scale": 1,
"disable_safety_check": true,
"eta": 0,
"guess_mode": false,
"guidance_scale": 8.72,
"inpainting_conditioning_scale": 1,
"ip_adapter_image": "https://replicate.delivery/pbxt/JvfJGnjAmUqqNLFm8OyfbOXynAQLvVOtgSrq2cWOWeAb2wZW/Cool-PC-Wallpapers-HD-2.jpg",
"ip_adapter_weight": 0.3,
"lineart_conditioning_scale": 1.2,
"lineart_image": "https://replicate.delivery/pbxt/JvfJGnmbU8uxfzsCeqLBCdEoeOQT09xZOAQLGbGLqyNYrrKc/output.png",
"max_height": 712,
"max_width": 712,
"negative_prompt": "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cat",
"scheduler": "K_EULER_ANCESTRAL",
"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": "lup6bnlbutbqupmzu5g43fieye",
"model": "usamaehsan/controlnet-x-majic-mix-realistic-x-ip-adapter",
"version": "6871e1d728bb30a0b0490884932674303d7b35ba7e6aa18e668676cccbf9c41f",
"input": {
"brightness_conditioning_scale": 1,
"disable_safety_check": true,
"eta": 0,
"guess_mode": false,
"guidance_scale": 8.72,
"inpainting_conditioning_scale": 1,
"ip_adapter_image": "https://replicate.delivery/pbxt/JvfJGnjAmUqqNLFm8OyfbOXynAQLvVOtgSrq2cWOWeAb2wZW/Cool-PC-Wallpapers-HD-2.jpg",
"ip_adapter_weight": 0.3,
"lineart_conditioning_scale": 1.2,
"lineart_image": "https://replicate.delivery/pbxt/JvfJGnmbU8uxfzsCeqLBCdEoeOQT09xZOAQLGbGLqyNYrrKc/output.png",
"max_height": 712,
"max_width": 712,
"negative_prompt": "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cat",
"scheduler": "K_EULER_ANCESTRAL",
"sorted_controlnets": "tile, inpainting, lineart",
"tile_conditioning_scale": 1
},
"logs": "using ip adapter:: /tmp/tmpca1o91mmCool-PC-Wallpapers-HD-2.jpg\nloading ip adapter\nTime taken to load IP adapter model: 0.01 seconds\nTime taken to load image encoder model: 0.00 seconds\nUsing seed: 31051\nip adapter---\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:06, 4.81it/s]\n 10%|█ | 3/30 [00:00<00:03, 7.73it/s]\n 13%|█▎ | 4/30 [00:00<00:03, 7.75it/s]\n 17%|█▋ | 5/30 [00:00<00:03, 7.76it/s]\n 20%|██ | 6/30 [00:00<00:03, 7.77it/s]\n 23%|██▎ | 7/30 [00:00<00:02, 7.77it/s]\n 27%|██▋ | 8/30 [00:01<00:02, 7.78it/s]\n 30%|███ | 9/30 [00:01<00:02, 7.78it/s]\n 33%|███▎ | 10/30 [00:01<00:02, 7.76it/s]\n 37%|███▋ | 11/30 [00:01<00:02, 7.76it/s]\n 40%|████ | 12/30 [00:01<00:02, 7.76it/s]\n 43%|████▎ | 13/30 [00:01<00:02, 7.75it/s]\n 47%|████▋ | 14/30 [00:01<00:02, 7.75it/s]\n 50%|█████ | 15/30 [00:01<00:01, 7.75it/s]\n 53%|█████▎ | 16/30 [00:02<00:01, 7.76it/s]\n 57%|█████▋ | 17/30 [00:02<00:01, 7.75it/s]\n 60%|██████ | 18/30 [00:02<00:01, 7.75it/s]\n 63%|██████▎ | 19/30 [00:02<00:01, 7.75it/s]\n 67%|██████▋ | 20/30 [00:02<00:01, 7.75it/s]\n 70%|███████ | 21/30 [00:02<00:01, 7.74it/s]\n 73%|███████▎ | 22/30 [00:02<00:01, 7.74it/s]\n 77%|███████▋ | 23/30 [00:02<00:00, 7.74it/s]\n 80%|████████ | 24/30 [00:03<00:00, 7.74it/s]\n 83%|████████▎ | 25/30 [00:03<00:00, 7.74it/s]\n 87%|████████▋ | 26/30 [00:03<00:00, 7.73it/s]\n 90%|█████████ | 27/30 [00:03<00:00, 7.73it/s]\n 93%|█████████▎| 28/30 [00:03<00:00, 7.73it/s]\n 97%|█████████▋| 29/30 [00:03<00:00, 7.73it/s]\n100%|██████████| 30/30 [00:03<00:00, 7.72it/s]\n100%|██████████| 30/30 [00:03<00:00, 7.70it/s]\nsize: (712, 712)",
"output": [
"https://replicate.delivery/pbxt/VAB6JgQ91AZnIBexOSg1iX6oIMKetsAvOPv4pyWJ6mQnCa7RA/seed-31051.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-24T00:28:42.830857Z",
"started_at": "2023-11-24T00:30:22.520129Z",
"completed_at": "2023-11-24T00:30:32.243146Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/lup6bnlbutbqupmzu5g43fieye/cancel",
"get": "https://api.replicate.com/v1/predictions/lup6bnlbutbqupmzu5g43fieye"
},
"metrics": {
"predict_time": 9.723017,
"total_time": 109.412289
}
}