Readme
This model doesn't have a readme.
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run prompthunt/cog-sdxl-controlnet-inference using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"prompthunt/cog-sdxl-controlnet-inference:c748f859defb73fe0679ce88bf56c8c203cd9bbe4e81be20325ad65c041a7641",
{
input: {
seed: 1234,
image: "https://replicate.delivery/pbxt/JtBXIeco0ymI5gPV7hbpb3N8gjPGQePmadfUmXV6njkeM7E9/w1024.jpeg",
width: 1024,
height: 1024,
prompt: "((Moody portrait)) of TOK man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes",
refine: "no_refiner",
scheduler: "K_EULER",
lora_scale: 0.6,
num_outputs: 1,
lora_weights: "https://replicate.delivery/pbxt/yuebGYwbnLUIbiFtTk4tjkkO2BJMcPheYILs7vy7MnzMpB5RA/trained_model.tar",
controlnet_end: 1,
guidance_scale: 3,
apply_watermark: true,
high_noise_frac: 0.8,
negative_prompt: "defined jawline, plastic, blurry, grainy, [deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry",
prompt_strength: 0.8,
controlnet_start: 0,
num_inference_steps: 25,
controlnet_conditioning_scale: 0.5
}
}
);
// 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 prompthunt/cog-sdxl-controlnet-inference using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"prompthunt/cog-sdxl-controlnet-inference:c748f859defb73fe0679ce88bf56c8c203cd9bbe4e81be20325ad65c041a7641",
input={
"seed": 1234,
"image": "https://replicate.delivery/pbxt/JtBXIeco0ymI5gPV7hbpb3N8gjPGQePmadfUmXV6njkeM7E9/w1024.jpeg",
"width": 1024,
"height": 1024,
"prompt": "((Moody portrait)) of TOK man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes",
"refine": "no_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"lora_weights": "https://replicate.delivery/pbxt/yuebGYwbnLUIbiFtTk4tjkkO2BJMcPheYILs7vy7MnzMpB5RA/trained_model.tar",
"controlnet_end": 1,
"guidance_scale": 3,
"apply_watermark": True,
"high_noise_frac": 0.8,
"negative_prompt": "defined jawline, plastic, blurry, grainy, [deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry",
"prompt_strength": 0.8,
"controlnet_start": 0,
"num_inference_steps": 25,
"controlnet_conditioning_scale": 0.5
}
)
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 prompthunt/cog-sdxl-controlnet-inference 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": "c748f859defb73fe0679ce88bf56c8c203cd9bbe4e81be20325ad65c041a7641",
"input": {
"seed": 1234,
"image": "https://replicate.delivery/pbxt/JtBXIeco0ymI5gPV7hbpb3N8gjPGQePmadfUmXV6njkeM7E9/w1024.jpeg",
"width": 1024,
"height": 1024,
"prompt": "((Moody portrait)) of TOK man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes",
"refine": "no_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"lora_weights": "https://replicate.delivery/pbxt/yuebGYwbnLUIbiFtTk4tjkkO2BJMcPheYILs7vy7MnzMpB5RA/trained_model.tar",
"controlnet_end": 1,
"guidance_scale": 3,
"apply_watermark": true,
"high_noise_frac": 0.8,
"negative_prompt": "defined jawline, plastic, blurry, grainy, [deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry",
"prompt_strength": 0.8,
"controlnet_start": 0,
"num_inference_steps": 25,
"controlnet_conditioning_scale": 0.5
}
}' \
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
{
"completed_at": "2023-11-16T21:28:43.331150Z",
"created_at": "2023-11-16T21:28:29.220765Z",
"data_removed": false,
"error": null,
"id": "723p4ldb2m6qgp47s5uydlunou",
"input": {
"seed": 1234,
"image": "https://replicate.delivery/pbxt/JtBXIeco0ymI5gPV7hbpb3N8gjPGQePmadfUmXV6njkeM7E9/w1024.jpeg",
"width": 1024,
"height": 1024,
"prompt": "((Moody portrait)) of TOK man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes",
"refine": "no_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"lora_weights": "https://replicate.delivery/pbxt/yuebGYwbnLUIbiFtTk4tjkkO2BJMcPheYILs7vy7MnzMpB5RA/trained_model.tar",
"controlnet_end": 1,
"guidance_scale": 3,
"apply_watermark": true,
"high_noise_frac": 0.8,
"negative_prompt": "defined jawline, plastic, blurry, grainy, [deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry",
"prompt_strength": 0.8,
"controlnet_start": 0,
"num_inference_steps": 25,
"controlnet_conditioning_scale": 0.5
},
"logs": "Using seed: 1234\nLoading sdxl txt2img pipeline...\nLoading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]\nLoading pipeline components...: 29%|██▊ | 2/7 [00:00<00:00, 6.99it/s]\nLoading pipeline components...: 57%|█████▋ | 4/7 [00:00<00:00, 6.95it/s]\nLoading pipeline components...: 86%|████████▌ | 6/7 [00:01<00:00, 5.11it/s]\nLoading pipeline components...: 100%|██████████| 7/7 [00:01<00:00, 6.08it/s]\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nLoading SDXL img2img pipeline...\nLoading SDXL inpaint pipeline...\nLoading controlnet model\nimg2img mode\nPrompt: ((Moody portrait)) of <s0><s1> man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:05, 3.69it/s]\n 10%|█ | 2/20 [00:00<00:04, 3.68it/s]\n 15%|█▌ | 3/20 [00:00<00:04, 3.68it/s]\n 20%|██ | 4/20 [00:01<00:04, 3.67it/s]\n 25%|██▌ | 5/20 [00:01<00:04, 3.67it/s]\n 30%|███ | 6/20 [00:01<00:03, 3.67it/s]\n 35%|███▌ | 7/20 [00:01<00:03, 3.68it/s]\n 40%|████ | 8/20 [00:02<00:03, 3.68it/s]\n 45%|████▌ | 9/20 [00:02<00:02, 3.68it/s]\n 50%|█████ | 10/20 [00:02<00:02, 3.68it/s]\n 55%|█████▌ | 11/20 [00:02<00:02, 3.68it/s]\n 60%|██████ | 12/20 [00:03<00:02, 3.68it/s]\n 65%|██████▌ | 13/20 [00:03<00:01, 3.68it/s]\n 70%|███████ | 14/20 [00:03<00:01, 3.68it/s]\n 75%|███████▌ | 15/20 [00:04<00:01, 3.68it/s]\n 80%|████████ | 16/20 [00:04<00:01, 3.68it/s]\n 85%|████████▌ | 17/20 [00:04<00:00, 3.68it/s]\n 90%|█████████ | 18/20 [00:04<00:00, 3.68it/s]\n 95%|█████████▌| 19/20 [00:05<00:00, 3.68it/s]\n100%|██████████| 20/20 [00:05<00:00, 3.68it/s]\n100%|██████████| 20/20 [00:05<00:00, 3.68it/s]",
"metrics": {
"predict_time": 14.054828,
"total_time": 14.110385
},
"output": [
"https://replicate.delivery/pbxt/bEf9XAvle3vSckOAyTBXmMSOYIqbf0jdgDGbtKTCKVAVcHyjA/out-0.png"
],
"started_at": "2023-11-16T21:28:29.276322Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/723p4ldb2m6qgp47s5uydlunou",
"cancel": "https://api.replicate.com/v1/predictions/723p4ldb2m6qgp47s5uydlunou/cancel"
},
"version": "c748f859defb73fe0679ce88bf56c8c203cd9bbe4e81be20325ad65c041a7641"
}
Using seed: 1234
Loading sdxl txt2img pipeline...
Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]
Loading pipeline components...: 29%|██▊ | 2/7 [00:00<00:00, 6.99it/s]
Loading pipeline components...: 57%|█████▋ | 4/7 [00:00<00:00, 6.95it/s]
Loading pipeline components...: 86%|████████▌ | 6/7 [00:01<00:00, 5.11it/s]
Loading pipeline components...: 100%|██████████| 7/7 [00:01<00:00, 6.08it/s]
Loading fine-tuned model
Does not have Unet. assume we are using LoRA
Loading Unet LoRA
Loading SDXL img2img pipeline...
Loading SDXL inpaint pipeline...
Loading controlnet model
img2img mode
Prompt: ((Moody portrait)) of <s0><s1> man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes
0%| | 0/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:05, 3.69it/s]
10%|█ | 2/20 [00:00<00:04, 3.68it/s]
15%|█▌ | 3/20 [00:00<00:04, 3.68it/s]
20%|██ | 4/20 [00:01<00:04, 3.67it/s]
25%|██▌ | 5/20 [00:01<00:04, 3.67it/s]
30%|███ | 6/20 [00:01<00:03, 3.67it/s]
35%|███▌ | 7/20 [00:01<00:03, 3.68it/s]
40%|████ | 8/20 [00:02<00:03, 3.68it/s]
45%|████▌ | 9/20 [00:02<00:02, 3.68it/s]
50%|█████ | 10/20 [00:02<00:02, 3.68it/s]
55%|█████▌ | 11/20 [00:02<00:02, 3.68it/s]
60%|██████ | 12/20 [00:03<00:02, 3.68it/s]
65%|██████▌ | 13/20 [00:03<00:01, 3.68it/s]
70%|███████ | 14/20 [00:03<00:01, 3.68it/s]
75%|███████▌ | 15/20 [00:04<00:01, 3.68it/s]
80%|████████ | 16/20 [00:04<00:01, 3.68it/s]
85%|████████▌ | 17/20 [00:04<00:00, 3.68it/s]
90%|█████████ | 18/20 [00:04<00:00, 3.68it/s]
95%|█████████▌| 19/20 [00:05<00:00, 3.68it/s]
100%|██████████| 20/20 [00:05<00:00, 3.68it/s]
100%|██████████| 20/20 [00:05<00:00, 3.68it/s]
This model costs approximately $0.016 to run on Replicate, or 62 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.
This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 17 seconds. The predict time for this model varies significantly based on the inputs.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input
Choose a file from your machine
Hint: you can also drag files onto the input
Choose a file from your machine
Hint: you can also drag files onto the input
Using seed: 1234
Loading sdxl txt2img pipeline...
Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]
Loading pipeline components...: 29%|██▊ | 2/7 [00:00<00:00, 6.99it/s]
Loading pipeline components...: 57%|█████▋ | 4/7 [00:00<00:00, 6.95it/s]
Loading pipeline components...: 86%|████████▌ | 6/7 [00:01<00:00, 5.11it/s]
Loading pipeline components...: 100%|██████████| 7/7 [00:01<00:00, 6.08it/s]
Loading fine-tuned model
Does not have Unet. assume we are using LoRA
Loading Unet LoRA
Loading SDXL img2img pipeline...
Loading SDXL inpaint pipeline...
Loading controlnet model
img2img mode
Prompt: ((Moody portrait)) of <s0><s1> man wearing glasses dressed in arctic fashion against an arctic backdrop with iceberg influences, perfect eyes
0%| | 0/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:05, 3.69it/s]
10%|█ | 2/20 [00:00<00:04, 3.68it/s]
15%|█▌ | 3/20 [00:00<00:04, 3.68it/s]
20%|██ | 4/20 [00:01<00:04, 3.67it/s]
25%|██▌ | 5/20 [00:01<00:04, 3.67it/s]
30%|███ | 6/20 [00:01<00:03, 3.67it/s]
35%|███▌ | 7/20 [00:01<00:03, 3.68it/s]
40%|████ | 8/20 [00:02<00:03, 3.68it/s]
45%|████▌ | 9/20 [00:02<00:02, 3.68it/s]
50%|█████ | 10/20 [00:02<00:02, 3.68it/s]
55%|█████▌ | 11/20 [00:02<00:02, 3.68it/s]
60%|██████ | 12/20 [00:03<00:02, 3.68it/s]
65%|██████▌ | 13/20 [00:03<00:01, 3.68it/s]
70%|███████ | 14/20 [00:03<00:01, 3.68it/s]
75%|███████▌ | 15/20 [00:04<00:01, 3.68it/s]
80%|████████ | 16/20 [00:04<00:01, 3.68it/s]
85%|████████▌ | 17/20 [00:04<00:00, 3.68it/s]
90%|█████████ | 18/20 [00:04<00:00, 3.68it/s]
95%|█████████▌| 19/20 [00:05<00:00, 3.68it/s]
100%|██████████| 20/20 [00:05<00:00, 3.68it/s]
100%|██████████| 20/20 [00:05<00:00, 3.68it/s]