typefile
{
"adapter_conditioning_factor": 0.9,
"adapter_conditioning_scale": 0.9,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/JbnAELoOIkMhteHqHJnRfB0ATKgRdZqLjdIgcZB34WlRNCNF/people.jpg",
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"num_samples": 1,
"prompt": "A couple, 4k photo, highly detailed",
"scheduler": "K_EULER_ANCESTRAL"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_BZQ**********************************
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 adirik/t2i-adapter-sdxl-openpose 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-openpose:6e87d127eb184d446b8cec0c2b034b3c7b24d08e211ec28247cdeb2e0a460670",
{
input: {
adapter_conditioning_factor: 0.9,
adapter_conditioning_scale: 0.9,
guidance_scale: 7.5,
image: "https://replicate.delivery/pbxt/JbnAELoOIkMhteHqHJnRfB0ATKgRdZqLjdIgcZB34WlRNCNF/people.jpg",
negative_prompt: "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
num_inference_steps: 30,
num_samples: 1,
prompt: "A couple, 4k photo, highly detailed",
scheduler: "K_EULER_ANCESTRAL"
}
}
);
// 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_BZQ**********************************
This is your API token. Keep it to yourself.
import replicate
Run adirik/t2i-adapter-sdxl-openpose using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"adirik/t2i-adapter-sdxl-openpose:6e87d127eb184d446b8cec0c2b034b3c7b24d08e211ec28247cdeb2e0a460670",
input={
"adapter_conditioning_factor": 0.9,
"adapter_conditioning_scale": 0.9,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/JbnAELoOIkMhteHqHJnRfB0ATKgRdZqLjdIgcZB34WlRNCNF/people.jpg",
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"num_samples": 1,
"prompt": "A couple, 4k photo, highly detailed",
"scheduler": "K_EULER_ANCESTRAL"
}
)
# 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_BZQ**********************************
This is your API token. Keep it to yourself.
Run adirik/t2i-adapter-sdxl-openpose 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-openpose:6e87d127eb184d446b8cec0c2b034b3c7b24d08e211ec28247cdeb2e0a460670",
"input": {
"adapter_conditioning_factor": 0.9,
"adapter_conditioning_scale": 0.9,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/JbnAELoOIkMhteHqHJnRfB0ATKgRdZqLjdIgcZB34WlRNCNF/people.jpg",
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"num_samples": 1,
"prompt": "A couple, 4k photo, highly detailed",
"scheduler": "K_EULER_ANCESTRAL"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "gk2lem3bosrbmdz5itfokdtvhe",
"model": "adirik/t2i-adapter-sdxl-openpose",
"version": "6e87d127eb184d446b8cec0c2b034b3c7b24d08e211ec28247cdeb2e0a460670",
"input": {
"adapter_conditioning_factor": 0.9,
"adapter_conditioning_scale": 0.9,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/JbnAELoOIkMhteHqHJnRfB0ATKgRdZqLjdIgcZB34WlRNCNF/people.jpg",
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
"num_inference_steps": 30,
"num_samples": 1,
"prompt": "A couple, 4k photo, highly detailed",
"scheduler": "K_EULER_ANCESTRAL"
},
"logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:04, 6.05it/s]\n 7%|▋ | 2/30 [00:00<00:06, 4.50it/s]\n 10%|█ | 3/30 [00:00<00:06, 4.12it/s]\n 13%|█▎ | 4/30 [00:00<00:06, 3.97it/s]\n 17%|█▋ | 5/30 [00:01<00:06, 3.89it/s]\n 20%|██ | 6/30 [00:01<00:06, 3.83it/s]\n 23%|██▎ | 7/30 [00:01<00:06, 3.80it/s]\n 27%|██▋ | 8/30 [00:02<00:05, 3.78it/s]\n 30%|███ | 9/30 [00:02<00:05, 3.77it/s]\n 33%|███▎ | 10/30 [00:02<00:05, 3.76it/s]\n 37%|███▋ | 11/30 [00:02<00:05, 3.74it/s]\n 40%|████ | 12/30 [00:03<00:04, 3.74it/s]\n 43%|████▎ | 13/30 [00:03<00:04, 3.74it/s]\n 47%|████▋ | 14/30 [00:03<00:04, 3.73it/s]\n 50%|█████ | 15/30 [00:03<00:04, 3.73it/s]\n 53%|█████▎ | 16/30 [00:04<00:03, 3.73it/s]\n 57%|█████▋ | 17/30 [00:04<00:03, 3.73it/s]\n 60%|██████ | 18/30 [00:04<00:03, 3.72it/s]\n 63%|██████▎ | 19/30 [00:04<00:02, 3.73it/s]\n 67%|██████▋ | 20/30 [00:05<00:02, 3.72it/s]\n 70%|███████ | 21/30 [00:05<00:02, 3.72it/s]\n 73%|███████▎ | 22/30 [00:05<00:02, 3.72it/s]\n 77%|███████▋ | 23/30 [00:06<00:01, 3.73it/s]\n 80%|████████ | 24/30 [00:06<00:01, 3.72it/s]\n 83%|████████▎ | 25/30 [00:06<00:01, 3.72it/s]\n 87%|████████▋ | 26/30 [00:06<00:01, 3.72it/s]\n 90%|█████████ | 27/30 [00:07<00:00, 3.71it/s]\n 93%|█████████▎| 28/30 [00:07<00:00, 3.72it/s]\n 97%|█████████▋| 29/30 [00:07<00:00, 3.72it/s]\n100%|██████████| 30/30 [00:07<00:00, 3.72it/s]\n100%|██████████| 30/30 [00:07<00:00, 3.78it/s]",
"output": [
"https://pbxt.replicate.delivery/zLV4rptJWbKOKpMauzP4ASa0ZwMhs29NYD4Ckdy3uhSpUoaE/out-preprocessed.png",
"https://pbxt.replicate.delivery/nuE2A9YWRkLaN1ptkgad1JeHtYJwUWAt6p7Bie0fYDcNlCVjA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-03T18:49:23.572065Z",
"started_at": "2023-10-03T18:51:06.68795Z",
"completed_at": "2023-10-03T18:51:19.116216Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/gk2lem3bosrbmdz5itfokdtvhe/cancel",
"get": "https://api.replicate.com/v1/predictions/gk2lem3bosrbmdz5itfokdtvhe"
},
"metrics": {
"predict_time": 12.428266,
"total_time": 115.544151
}
}

