Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
pnyompen /sd-controlnet-lora:45f27d98
Input
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run pnyompen/sd-controlnet-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pnyompen/sd-controlnet-lora:45f27d985ae0409c990d1c23cbb9656f3ef8ed826078dd606b3af243e09d6244",
{
input: {
image: "https://replicate.delivery/pbxt/JiOTMCHj4oGrTTf8Pg2r7vyI8YdXc5jL2IDyC2SfhuggjYe6/out-0%20%281%29.png",
prompt: "In the style of steampunk ",
img2img: true,
strength: 1,
scheduler: "KarrasDPM",
lora_scale: 0.95,
num_outputs: 1,
guidance_scale: 7.5,
condition_scale: 0.5,
negative_prompt: "worst quality, photorealistic ",
ip_adapter_scale: 0.1,
num_inference_steps: 15,
auto_generate_caption: true,
generated_caption_weight: 0.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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run pnyompen/sd-controlnet-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pnyompen/sd-controlnet-lora:45f27d985ae0409c990d1c23cbb9656f3ef8ed826078dd606b3af243e09d6244",
input={
"image": "https://replicate.delivery/pbxt/JiOTMCHj4oGrTTf8Pg2r7vyI8YdXc5jL2IDyC2SfhuggjYe6/out-0%20%281%29.png",
"prompt": "In the style of steampunk ",
"img2img": True,
"strength": 1,
"scheduler": "KarrasDPM",
"lora_scale": 0.95,
"num_outputs": 1,
"guidance_scale": 7.5,
"condition_scale": 0.5,
"negative_prompt": "worst quality, photorealistic ",
"ip_adapter_scale": 0.1,
"num_inference_steps": 15,
"auto_generate_caption": True,
"generated_caption_weight": 0.1
}
)
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 pnyompen/sd-controlnet-lora 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": "pnyompen/sd-controlnet-lora:45f27d985ae0409c990d1c23cbb9656f3ef8ed826078dd606b3af243e09d6244",
"input": {
"image": "https://replicate.delivery/pbxt/JiOTMCHj4oGrTTf8Pg2r7vyI8YdXc5jL2IDyC2SfhuggjYe6/out-0%20%281%29.png",
"prompt": "In the style of steampunk ",
"img2img": true,
"strength": 1,
"scheduler": "KarrasDPM",
"lora_scale": 0.95,
"num_outputs": 1,
"guidance_scale": 7.5,
"condition_scale": 0.5,
"negative_prompt": "worst quality, photorealistic ",
"ip_adapter_scale": 0.1,
"num_inference_steps": 15,
"auto_generate_caption": true,
"generated_caption_weight": 0.1
}
}' \
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
Output
{
"completed_at": "2024-07-23T22:16:25.905948Z",
"created_at": "2024-07-23T22:16:20.785000Z",
"data_removed": false,
"error": null,
"id": "2tyy4g5t65rg80cgw6nbavmw00",
"input": {
"image": "https://replicate.delivery/pbxt/JiOTMCHj4oGrTTf8Pg2r7vyI8YdXc5jL2IDyC2SfhuggjYe6/out-0%20%281%29.png",
"prompt": "In the style of steampunk ",
"img2img": true,
"strength": 1,
"scheduler": "KarrasDPM",
"lora_scale": 0.95,
"num_outputs": 1,
"guidance_scale": 7.5,
"condition_scale": 0.5,
"negative_prompt": "worst quality, photorealistic ",
"ip_adapter_scale": 0.1,
"num_inference_steps": 15,
"auto_generate_caption": true,
"generated_caption_weight": 0.1
},
"logs": "Using seed: 61559\nOriginal width:1024, height:1024\nAspect Ratio: 1.00\nnew_width:512, new_height:512\nauto_generate_caption mode\nGenerating captions\nGenerated captions ['blond woman with blue eyes standing on city street at dusk']\nGenerating captions took: 0.4014008045196533\nPrompt: (\"In the style of steampunk \", \"blond woman with blue eyes standing on city street at dusk\").blend(1, 0.1)\nimg2img mode\n 0%| | 0/15 [00:00<?, ?it/s]\n 7%|▋ | 1/15 [00:00<00:01, 9.94it/s]\n 13%|█▎ | 2/15 [00:00<00:02, 5.95it/s]\n 20%|██ | 3/15 [00:00<00:02, 5.26it/s]\n 27%|██▋ | 4/15 [00:00<00:02, 4.83it/s]\n 33%|███▎ | 5/15 [00:00<00:02, 4.67it/s]\n 40%|████ | 6/15 [00:01<00:01, 4.61it/s]\n 47%|████▋ | 7/15 [00:01<00:01, 4.58it/s]\n 53%|█████▎ | 8/15 [00:01<00:01, 4.56it/s]\n 60%|██████ | 9/15 [00:01<00:01, 4.48it/s]\n 67%|██████▋ | 10/15 [00:02<00:01, 4.50it/s]\n 73%|███████▎ | 11/15 [00:02<00:00, 4.50it/s]\n 80%|████████ | 12/15 [00:02<00:00, 4.51it/s]\n 87%|████████▋ | 13/15 [00:02<00:00, 4.46it/s]\n 93%|█████████▎| 14/15 [00:03<00:00, 4.48it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.49it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.65it/s]",
"metrics": {
"predict_time": 5.096592766,
"total_time": 5.120948
},
"output": [
"https://replicate.delivery/czjl/ZKDzBX5VOUZFLN3svMxQkSEpUodXR94X8CjWLm16CQcud3yE/out-0.png"
],
"started_at": "2024-07-23T22:16:20.809355Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/2tyy4g5t65rg80cgw6nbavmw00",
"cancel": "https://api.replicate.com/v1/predictions/2tyy4g5t65rg80cgw6nbavmw00/cancel"
},
"version": "45f27d985ae0409c990d1c23cbb9656f3ef8ed826078dd606b3af243e09d6244"
}
Using seed: 61559
Original width:1024, height:1024
Aspect Ratio: 1.00
new_width:512, new_height:512
auto_generate_caption mode
Generating captions
Generated captions ['blond woman with blue eyes standing on city street at dusk']
Generating captions took: 0.4014008045196533
Prompt: ("In the style of steampunk ", "blond woman with blue eyes standing on city street at dusk").blend(1, 0.1)
img2img mode
0%| | 0/15 [00:00<?, ?it/s]
7%|▋ | 1/15 [00:00<00:01, 9.94it/s]
13%|█▎ | 2/15 [00:00<00:02, 5.95it/s]
20%|██ | 3/15 [00:00<00:02, 5.26it/s]
27%|██▋ | 4/15 [00:00<00:02, 4.83it/s]
33%|███▎ | 5/15 [00:00<00:02, 4.67it/s]
40%|████ | 6/15 [00:01<00:01, 4.61it/s]
47%|████▋ | 7/15 [00:01<00:01, 4.58it/s]
53%|█████▎ | 8/15 [00:01<00:01, 4.56it/s]
60%|██████ | 9/15 [00:01<00:01, 4.48it/s]
67%|██████▋ | 10/15 [00:02<00:01, 4.50it/s]
73%|███████▎ | 11/15 [00:02<00:00, 4.50it/s]
80%|████████ | 12/15 [00:02<00:00, 4.51it/s]
87%|████████▋ | 13/15 [00:02<00:00, 4.46it/s]
93%|█████████▎| 14/15 [00:03<00:00, 4.48it/s]
100%|██████████| 15/15 [00:03<00:00, 4.49it/s]
100%|██████████| 15/15 [00:03<00:00, 4.65it/s]