You're looking at a specific version of this model. Jump to the model overview.
adirik /t2i-adapter-sdxl-lineart:43672c50
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run adirik/t2i-adapter-sdxl-lineart using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"adirik/t2i-adapter-sdxl-lineart:43672c5012b7e26473bf625831654f6a9452ae3b2f72f29424d8f1a0a6315449",
{
input: {
image: "https://replicate.delivery/pbxt/Jbn7HU47GHRIgHPwC9IZRUFGZ8zNzz9kYqyJq77wdEZ8GmTg/org_lin.jpg",
prompt: "Ice dragon roar, 4k photo",
scheduler: "K_EULER_ANCESTRAL",
num_samples: 1,
guidance_scale: 7.5,
negative_prompt: "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
num_inference_steps: 30,
adapter_conditioning_scale: 0.8,
adapter_conditioning_factor: 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 adirik/t2i-adapter-sdxl-lineart using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"adirik/t2i-adapter-sdxl-lineart:43672c5012b7e26473bf625831654f6a9452ae3b2f72f29424d8f1a0a6315449",
input={
"image": "https://replicate.delivery/pbxt/Jbn7HU47GHRIgHPwC9IZRUFGZ8zNzz9kYqyJq77wdEZ8GmTg/org_lin.jpg",
"prompt": "Ice dragon roar, 4k photo",
"scheduler": "K_EULER_ANCESTRAL",
"num_samples": 1,
"guidance_scale": 7.5,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"adapter_conditioning_scale": 0.8,
"adapter_conditioning_factor": 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 adirik/t2i-adapter-sdxl-lineart 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": "adirik/t2i-adapter-sdxl-lineart:43672c5012b7e26473bf625831654f6a9452ae3b2f72f29424d8f1a0a6315449",
"input": {
"image": "https://replicate.delivery/pbxt/Jbn7HU47GHRIgHPwC9IZRUFGZ8zNzz9kYqyJq77wdEZ8GmTg/org_lin.jpg",
"prompt": "Ice dragon roar, 4k photo",
"scheduler": "K_EULER_ANCESTRAL",
"num_samples": 1,
"guidance_scale": 7.5,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"adapter_conditioning_scale": 0.8,
"adapter_conditioning_factor": 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-10-03T17:51:19.526916Z",
"created_at": "2023-10-03T17:49:17.964542Z",
"data_removed": false,
"error": null,
"id": "3laatitbp3upivlgg7apan5e64",
"input": {
"image": "https://replicate.delivery/pbxt/Jbn7HU47GHRIgHPwC9IZRUFGZ8zNzz9kYqyJq77wdEZ8GmTg/org_lin.jpg",
"prompt": "Ice dragon roar, 4k photo",
"scheduler": "K_EULER_ANCESTRAL",
"num_samples": 1,
"guidance_scale": 7.5,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"adapter_conditioning_scale": 0.8,
"adapter_conditioning_factor": 1
},
"logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:06, 4.70it/s]\n 7%|▋ | 2/30 [00:00<00:08, 3.22it/s]\n 10%|█ | 3/30 [00:00<00:09, 2.91it/s]\n 13%|█▎ | 4/30 [00:01<00:09, 2.78it/s]\n 17%|█▋ | 5/30 [00:01<00:09, 2.72it/s]\n 20%|██ | 6/30 [00:02<00:08, 2.68it/s]\n 23%|██▎ | 7/30 [00:02<00:08, 2.66it/s]\n 27%|██▋ | 8/30 [00:02<00:08, 2.64it/s]\n 30%|███ | 9/30 [00:03<00:07, 2.63it/s]\n 33%|███▎ | 10/30 [00:03<00:07, 2.62it/s]\n 37%|███▋ | 11/30 [00:04<00:07, 2.62it/s]\n 40%|████ | 12/30 [00:04<00:06, 2.61it/s]\n 43%|████▎ | 13/30 [00:04<00:06, 2.61it/s]\n 47%|████▋ | 14/30 [00:05<00:06, 2.60it/s]\n 50%|█████ | 15/30 [00:05<00:05, 2.60it/s]\n 53%|█████▎ | 16/30 [00:05<00:05, 2.61it/s]\n 57%|█████▋ | 17/30 [00:06<00:04, 2.61it/s]\n 60%|██████ | 18/30 [00:06<00:04, 2.61it/s]\n 63%|██████▎ | 19/30 [00:07<00:04, 2.61it/s]\n 67%|██████▋ | 20/30 [00:07<00:03, 2.62it/s]\n 70%|███████ | 21/30 [00:07<00:03, 2.61it/s]\n 73%|███████▎ | 22/30 [00:08<00:03, 2.61it/s]\n 77%|███████▋ | 23/30 [00:08<00:02, 2.62it/s]\n 80%|████████ | 24/30 [00:09<00:02, 2.62it/s]\n 83%|████████▎ | 25/30 [00:09<00:01, 2.61it/s]\n 87%|████████▋ | 26/30 [00:09<00:01, 2.62it/s]\n 90%|█████████ | 27/30 [00:10<00:01, 2.61it/s]\n 93%|█████████▎| 28/30 [00:10<00:00, 2.61it/s]\n 97%|█████████▋| 29/30 [00:10<00:00, 2.61it/s]\n100%|██████████| 30/30 [00:11<00:00, 2.61it/s]\n100%|██████████| 30/30 [00:11<00:00, 2.65it/s]",
"metrics": {
"predict_time": 16.420516,
"total_time": 121.562374
},
"output": [
"https://replicate.delivery/pbxt/fMMx2msHiH0qXC0j4KLO4EWhvHE7BTcs90HOiydNbwILNQ1IA/out-preprocessed.png",
"https://replicate.delivery/pbxt/f8xV2WI2WdzpdCqOdgdBF4p8AI5LNEPTQ5WWjn62yUzLNQ1IA/out-0.png"
],
"started_at": "2023-10-03T17:51:03.106400Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/3laatitbp3upivlgg7apan5e64",
"cancel": "https://api.replicate.com/v1/predictions/3laatitbp3upivlgg7apan5e64/cancel"
},
"version": "43672c5012b7e26473bf625831654f6a9452ae3b2f72f29424d8f1a0a6315449"
}
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:06, 4.70it/s]
7%|▋ | 2/30 [00:00<00:08, 3.22it/s]
10%|█ | 3/30 [00:00<00:09, 2.91it/s]
13%|█▎ | 4/30 [00:01<00:09, 2.78it/s]
17%|█▋ | 5/30 [00:01<00:09, 2.72it/s]
20%|██ | 6/30 [00:02<00:08, 2.68it/s]
23%|██▎ | 7/30 [00:02<00:08, 2.66it/s]
27%|██▋ | 8/30 [00:02<00:08, 2.64it/s]
30%|███ | 9/30 [00:03<00:07, 2.63it/s]
33%|███▎ | 10/30 [00:03<00:07, 2.62it/s]
37%|███▋ | 11/30 [00:04<00:07, 2.62it/s]
40%|████ | 12/30 [00:04<00:06, 2.61it/s]
43%|████▎ | 13/30 [00:04<00:06, 2.61it/s]
47%|████▋ | 14/30 [00:05<00:06, 2.60it/s]
50%|█████ | 15/30 [00:05<00:05, 2.60it/s]
53%|█████▎ | 16/30 [00:05<00:05, 2.61it/s]
57%|█████▋ | 17/30 [00:06<00:04, 2.61it/s]
60%|██████ | 18/30 [00:06<00:04, 2.61it/s]
63%|██████▎ | 19/30 [00:07<00:04, 2.61it/s]
67%|██████▋ | 20/30 [00:07<00:03, 2.62it/s]
70%|███████ | 21/30 [00:07<00:03, 2.61it/s]
73%|███████▎ | 22/30 [00:08<00:03, 2.61it/s]
77%|███████▋ | 23/30 [00:08<00:02, 2.62it/s]
80%|████████ | 24/30 [00:09<00:02, 2.62it/s]
83%|████████▎ | 25/30 [00:09<00:01, 2.61it/s]
87%|████████▋ | 26/30 [00:09<00:01, 2.62it/s]
90%|█████████ | 27/30 [00:10<00:01, 2.61it/s]
93%|█████████▎| 28/30 [00:10<00:00, 2.61it/s]
97%|█████████▋| 29/30 [00:10<00:00, 2.61it/s]
100%|██████████| 30/30 [00:11<00:00, 2.61it/s]
100%|██████████| 30/30 [00:11<00:00, 2.65it/s]