defaultA monkey making latte art
typetext
{
"apply_watermark": true,
"controlnet_1": "soft_edge_hed",
"controlnet_1_conditioning_scale": 0.75,
"controlnet_1_end": 1,
"controlnet_1_image": "https://replicate.delivery/pbxt/KTWobEZiPRKJanaeqp2FqDfppvecWkJIZARLqRU3F0U54dtl/astro-on-horse.png",
"controlnet_1_start": 0,
"controlnet_2": "none",
"controlnet_2_conditioning_scale": 0.75,
"controlnet_2_end": 1,
"controlnet_2_start": 0,
"controlnet_3": "none",
"controlnet_3_conditioning_scale": 0.75,
"controlnet_3_end": 1,
"controlnet_3_start": 0,
"guidance_scale": 0,
"height": 1024,
"negative_prompt": "worst quality, low quality",
"num_inference_steps": 4,
"num_outputs": 1,
"prompt": "extreme macro photo of a golden astronaut riding a unicorn statue, in a museum, bokeh, 50mm",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"sizing_strategy": "width_height",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_eh6**********************************
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 lucataco/sdxl-lightning-multi-controlnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/sdxl-lightning-multi-controlnet:d5116b11698b41d34c322cbd7b0bf068015e47831af0527de7a178dc59c5f2ee",
{
input: {
apply_watermark: true,
controlnet_1: "soft_edge_hed",
controlnet_1_conditioning_scale: 0.75,
controlnet_1_end: 1,
controlnet_1_image: "https://replicate.delivery/pbxt/KTWobEZiPRKJanaeqp2FqDfppvecWkJIZARLqRU3F0U54dtl/astro-on-horse.png",
controlnet_1_start: 0,
controlnet_2: "none",
controlnet_2_conditioning_scale: 0.75,
controlnet_2_end: 1,
controlnet_2_start: 0,
controlnet_3: "none",
controlnet_3_conditioning_scale: 0.75,
controlnet_3_end: 1,
controlnet_3_start: 0,
guidance_scale: 0,
height: 1024,
negative_prompt: "worst quality, low quality",
num_inference_steps: 4,
num_outputs: 1,
prompt: "extreme macro photo of a golden astronaut riding a unicorn statue, in a museum, bokeh, 50mm",
prompt_strength: 0.8,
refine: "no_refiner",
scheduler: "K_EULER",
sizing_strategy: "width_height",
width: 1024
}
}
);
// 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_eh6**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/sdxl-lightning-multi-controlnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/sdxl-lightning-multi-controlnet:d5116b11698b41d34c322cbd7b0bf068015e47831af0527de7a178dc59c5f2ee",
input={
"apply_watermark": True,
"controlnet_1": "soft_edge_hed",
"controlnet_1_conditioning_scale": 0.75,
"controlnet_1_end": 1,
"controlnet_1_image": "https://replicate.delivery/pbxt/KTWobEZiPRKJanaeqp2FqDfppvecWkJIZARLqRU3F0U54dtl/astro-on-horse.png",
"controlnet_1_start": 0,
"controlnet_2": "none",
"controlnet_2_conditioning_scale": 0.75,
"controlnet_2_end": 1,
"controlnet_2_start": 0,
"controlnet_3": "none",
"controlnet_3_conditioning_scale": 0.75,
"controlnet_3_end": 1,
"controlnet_3_start": 0,
"guidance_scale": 0,
"height": 1024,
"negative_prompt": "worst quality, low quality",
"num_inference_steps": 4,
"num_outputs": 1,
"prompt": "extreme macro photo of a golden astronaut riding a unicorn statue, in a museum, bokeh, 50mm",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"sizing_strategy": "width_height",
"width": 1024
}
)
# 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_eh6**********************************
This is your API token. Keep it to yourself.
Run lucataco/sdxl-lightning-multi-controlnet 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": "lucataco/sdxl-lightning-multi-controlnet:d5116b11698b41d34c322cbd7b0bf068015e47831af0527de7a178dc59c5f2ee",
"input": {
"apply_watermark": true,
"controlnet_1": "soft_edge_hed",
"controlnet_1_conditioning_scale": 0.75,
"controlnet_1_end": 1,
"controlnet_1_image": "https://replicate.delivery/pbxt/KTWobEZiPRKJanaeqp2FqDfppvecWkJIZARLqRU3F0U54dtl/astro-on-horse.png",
"controlnet_1_start": 0,
"controlnet_2": "none",
"controlnet_2_conditioning_scale": 0.75,
"controlnet_2_end": 1,
"controlnet_2_start": 0,
"controlnet_3": "none",
"controlnet_3_conditioning_scale": 0.75,
"controlnet_3_end": 1,
"controlnet_3_start": 0,
"guidance_scale": 0,
"height": 1024,
"negative_prompt": "worst quality, low quality",
"num_inference_steps": 4,
"num_outputs": 1,
"prompt": "extreme macro photo of a golden astronaut riding a unicorn statue, in a museum, bokeh, 50mm",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"sizing_strategy": "width_height",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "56rxbylbcjgp6fkozzwcp75dx4",
"model": "lucataco/sdxl-lightning-multi-controlnet",
"version": "d5116b11698b41d34c322cbd7b0bf068015e47831af0527de7a178dc59c5f2ee",
"input": {
"apply_watermark": true,
"controlnet_1": "soft_edge_hed",
"controlnet_1_conditioning_scale": 0.75,
"controlnet_1_end": 1,
"controlnet_1_image": "https://replicate.delivery/pbxt/KTWobEZiPRKJanaeqp2FqDfppvecWkJIZARLqRU3F0U54dtl/astro-on-horse.png",
"controlnet_1_start": 0,
"controlnet_2": "none",
"controlnet_2_conditioning_scale": 0.75,
"controlnet_2_end": 1,
"controlnet_2_start": 0,
"controlnet_3": "none",
"controlnet_3_conditioning_scale": 0.75,
"controlnet_3_end": 1,
"controlnet_3_start": 0,
"guidance_scale": 0,
"height": 1024,
"negative_prompt": "worst quality, low quality",
"num_inference_steps": 4,
"num_outputs": 1,
"prompt": "extreme macro photo of a golden astronaut riding a unicorn statue, in a museum, bokeh, 50mm",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"sizing_strategy": "width_height",
"width": 1024
},
"logs": "Using seed: 3924493178\nUsing given dimensions\nresize took: 0.03s\nPrompt: extreme macro photo of a golden astronaut riding a unicorn statue, in a museum, bokeh, 50mm\nProcessing image with soft_edge_hed\ncontrolnet preprocess took: 0.58s\nUsing txt2img + controlnet pipeline\nLoading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]\nLoading pipeline components...: 100%|██████████| 7/7 [00:00<00:00, 15134.09it/s]\nYou have 1 ControlNets and you have passed 1 prompts. The conditionings will be fixed across the prompts.\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:00, 6.19it/s]\n 50%|█████ | 2/4 [00:00<00:00, 6.16it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 6.14it/s]\n100%|██████████| 4/4 [00:00<00:00, 6.14it/s]\n100%|██████████| 4/4 [00:00<00:00, 6.14it/s]\ninference took: 1.25s\nprediction took: 2.34s",
"output": [
"https://replicate.delivery/pbxt/uWqiRRbTlezCGyfu5ziSaIpsiuzmLGqukIJQeWGztkRJ7m1kA/control-0.png",
"https://replicate.delivery/pbxt/X0rtJUsEeXyOekN1yAEqeJLvSQegmKQoeroNC9Hzef6myuZNJA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-27T06:46:58.234118Z",
"started_at": "2024-02-27T06:46:58.245869Z",
"completed_at": "2024-02-27T06:47:01.532833Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/56rxbylbcjgp6fkozzwcp75dx4/cancel",
"get": "https://api.replicate.com/v1/predictions/56rxbylbcjgp6fkozzwcp75dx4"
},
"metrics": {
"predict_time": 3.286964,
"total_time": 3.298715
}
}

