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.
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 usamaehsan/controlnet-lineart-brightness-tile-inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"usamaehsan/controlnet-lineart-brightness-tile-inpainting:22f3c902303d2ebefec06a4a53d96af6a41cf46ef30de46c5ad9cd8f70b30a84",
{
input: {
eta: 0,
prompt: "underwater kingdom",
max_width: 412,
scheduler: "DDIM",
guess_mode: false,
max_height: 412,
low_res_fix: true,
num_outputs: 1,
lineart_image: "https://replicate.delivery/pbxt/JtxDFtHe0rVC4pvGUVGbnR8BOHLaFhGLA4YAScgno1FomeD9/ceb71f061de43744a245456771d6f95d.jpg",
guidance_scale: 7,
negative_prompt: "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
low_res_fix_steps: 10,
sorted_controlnets: "tile, inpainting, lineart",
num_inference_steps: 20,
disable_safety_check: false,
low_res_fix_resolution: 768,
tile_conditioning_scale: 1,
lineart_conditioning_scale: 1,
brightness_conditioning_scale: 1,
inpainting_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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run usamaehsan/controlnet-lineart-brightness-tile-inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"usamaehsan/controlnet-lineart-brightness-tile-inpainting:22f3c902303d2ebefec06a4a53d96af6a41cf46ef30de46c5ad9cd8f70b30a84",
input={
"eta": 0,
"prompt": "underwater kingdom",
"max_width": 412,
"scheduler": "DDIM",
"guess_mode": False,
"max_height": 412,
"low_res_fix": True,
"num_outputs": 1,
"lineart_image": "https://replicate.delivery/pbxt/JtxDFtHe0rVC4pvGUVGbnR8BOHLaFhGLA4YAScgno1FomeD9/ceb71f061de43744a245456771d6f95d.jpg",
"guidance_scale": 7,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"low_res_fix_steps": 10,
"sorted_controlnets": "tile, inpainting, lineart",
"num_inference_steps": 20,
"disable_safety_check": False,
"low_res_fix_resolution": 768,
"tile_conditioning_scale": 1,
"lineart_conditioning_scale": 1,
"brightness_conditioning_scale": 1,
"inpainting_conditioning_scale": 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 usamaehsan/controlnet-lineart-brightness-tile-inpainting 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-lineart-brightness-tile-inpainting:22f3c902303d2ebefec06a4a53d96af6a41cf46ef30de46c5ad9cd8f70b30a84",
"input": {
"eta": 0,
"prompt": "underwater kingdom",
"max_width": 412,
"scheduler": "DDIM",
"guess_mode": false,
"max_height": 412,
"low_res_fix": true,
"num_outputs": 1,
"lineart_image": "https://replicate.delivery/pbxt/JtxDFtHe0rVC4pvGUVGbnR8BOHLaFhGLA4YAScgno1FomeD9/ceb71f061de43744a245456771d6f95d.jpg",
"guidance_scale": 7,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"low_res_fix_steps": 10,
"sorted_controlnets": "tile, inpainting, lineart",
"num_inference_steps": 20,
"disable_safety_check": false,
"low_res_fix_resolution": 768,
"tile_conditioning_scale": 1,
"lineart_conditioning_scale": 1,
"brightness_conditioning_scale": 1,
"inpainting_conditioning_scale": 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": "2023-11-19T17:41:52.009888Z",
"created_at": "2023-11-19T17:41:41.861875Z",
"data_removed": false,
"error": null,
"id": "2yehosdb2qrbky2rsp7co2wvjq",
"input": {
"eta": 0,
"prompt": "underwater kingdom",
"max_width": 412,
"scheduler": "DDIM",
"guess_mode": false,
"max_height": 412,
"low_res_fix": true,
"num_outputs": 1,
"lineart_image": "https://replicate.delivery/pbxt/JtxDFtHe0rVC4pvGUVGbnR8BOHLaFhGLA4YAScgno1FomeD9/ceb71f061de43744a245456771d6f95d.jpg",
"guidance_scale": 7,
"negative_prompt": "Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"low_res_fix_steps": 10,
"sorted_controlnets": "tile, inpainting, lineart",
"num_inference_steps": 20,
"disable_safety_check": false,
"low_res_fix_resolution": 768,
"tile_conditioning_scale": 1,
"lineart_conditioning_scale": 1,
"brightness_conditioning_scale": 1,
"inpainting_conditioning_scale": 1
},
"logs": "lineart\nUsing seed: 29179\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:04, 4.69it/s]\n 20%|██ | 4/20 [00:00<00:01, 13.02it/s]\n 35%|███▌ | 7/20 [00:00<00:00, 16.80it/s]\n 50%|█████ | 10/20 [00:00<00:00, 18.66it/s]\n 65%|██████▌ | 13/20 [00:00<00:00, 19.80it/s]\n 80%|████████ | 16/20 [00:00<00:00, 20.65it/s]\n 95%|█████████▌| 19/20 [00:01<00:00, 21.24it/s]\n100%|██████████| 20/20 [00:01<00:00, 18.73it/s]\nsize: (352, 408)\nRunning low res fix...\ncondition image resize took 0.014973163604736328 seconds\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:03, 2.63it/s]\n 20%|██ | 2/10 [00:00<00:02, 3.98it/s]\n 30%|███ | 3/10 [00:00<00:01, 4.75it/s]\n 40%|████ | 4/10 [00:00<00:01, 5.22it/s]\n 50%|█████ | 5/10 [00:01<00:00, 5.54it/s]\n 60%|██████ | 6/10 [00:01<00:00, 5.74it/s]\n 70%|███████ | 7/10 [00:01<00:00, 5.88it/s]\n 80%|████████ | 8/10 [00:01<00:00, 5.97it/s]\n 90%|█████████ | 9/10 [00:01<00:00, 6.03it/s]\n100%|██████████| 10/10 [00:01<00:00, 6.07it/s]\n100%|██████████| 10/10 [00:01<00:00, 5.44it/s]\nlow-res-fix took 2.102013349533081seconds",
"metrics": {
"predict_time": 8.40441,
"total_time": 10.148013
},
"output": [
"https://replicate.delivery/pbxt/3MyrCc47OoL5Fp92B27f3KUqxgueXySQUkfjrGgND5L9WfnHB/seed-29179.png",
"https://replicate.delivery/pbxt/9x52xSzNWV4kKZejt8W78yU5GF82nu78fgfeWiRKwF6fb9PPC/low-res-40977.png"
],
"started_at": "2023-11-19T17:41:43.605478Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/2yehosdb2qrbky2rsp7co2wvjq",
"cancel": "https://api.replicate.com/v1/predictions/2yehosdb2qrbky2rsp7co2wvjq/cancel"
},
"version": "22f3c902303d2ebefec06a4a53d96af6a41cf46ef30de46c5ad9cd8f70b30a84"
}
lineart
Using seed: 29179
0%| | 0/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:04, 4.69it/s]
20%|██ | 4/20 [00:00<00:01, 13.02it/s]
35%|███▌ | 7/20 [00:00<00:00, 16.80it/s]
50%|█████ | 10/20 [00:00<00:00, 18.66it/s]
65%|██████▌ | 13/20 [00:00<00:00, 19.80it/s]
80%|████████ | 16/20 [00:00<00:00, 20.65it/s]
95%|█████████▌| 19/20 [00:01<00:00, 21.24it/s]
100%|██████████| 20/20 [00:01<00:00, 18.73it/s]
size: (352, 408)
Running low res fix...
condition image resize took 0.014973163604736328 seconds
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [00:00<00:03, 2.63it/s]
20%|██ | 2/10 [00:00<00:02, 3.98it/s]
30%|███ | 3/10 [00:00<00:01, 4.75it/s]
40%|████ | 4/10 [00:00<00:01, 5.22it/s]
50%|█████ | 5/10 [00:01<00:00, 5.54it/s]
60%|██████ | 6/10 [00:01<00:00, 5.74it/s]
70%|███████ | 7/10 [00:01<00:00, 5.88it/s]
80%|████████ | 8/10 [00:01<00:00, 5.97it/s]
90%|█████████ | 9/10 [00:01<00:00, 6.03it/s]
100%|██████████| 10/10 [00:01<00:00, 6.07it/s]
100%|██████████| 10/10 [00:01<00:00, 5.44it/s]
low-res-fix took 2.102013349533081seconds