typefile
{
"guidance_scale": 7.5,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/JyABinYetxHL1R5cADtbYxqZDEfwQEPl3El6duTXnSBrg6T4/replicate-prediction-qiflk73blyv6qfaxb376exmypi.png",
"image2": "https://replicate.delivery/pbxt/JyABiqwvs4E3IWJZV7Jd7EeMm5ny5iseTiElO6t9d2d1U3oM/replicate-prediction-5p7tdnlbdgchrecubfo5sxb2le.png",
"num_inference_steps": 25,
"scheduler": "K_EULER",
"strength1": 1,
"strength2": 1,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Nkb**********************************
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 lucataco/sdxl-img-blend using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/sdxl-img-blend:a755d9a0f404c0a80701a66a16bf8f87e3a8a2ec039b100543a50be3ec90a4d7",
{
input: {
guidance_scale: 7.5,
height: 1024,
image1: "https://replicate.delivery/pbxt/JyABinYetxHL1R5cADtbYxqZDEfwQEPl3El6duTXnSBrg6T4/replicate-prediction-qiflk73blyv6qfaxb376exmypi.png",
image2: "https://replicate.delivery/pbxt/JyABiqwvs4E3IWJZV7Jd7EeMm5ny5iseTiElO6t9d2d1U3oM/replicate-prediction-5p7tdnlbdgchrecubfo5sxb2le.png",
num_inference_steps: 25,
scheduler: "K_EULER",
strength1: 1,
strength2: 1,
width: 1024
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
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_Nkb**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/sdxl-img-blend using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/sdxl-img-blend:a755d9a0f404c0a80701a66a16bf8f87e3a8a2ec039b100543a50be3ec90a4d7",
input={
"guidance_scale": 7.5,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/JyABinYetxHL1R5cADtbYxqZDEfwQEPl3El6duTXnSBrg6T4/replicate-prediction-qiflk73blyv6qfaxb376exmypi.png",
"image2": "https://replicate.delivery/pbxt/JyABiqwvs4E3IWJZV7Jd7EeMm5ny5iseTiElO6t9d2d1U3oM/replicate-prediction-5p7tdnlbdgchrecubfo5sxb2le.png",
"num_inference_steps": 25,
"scheduler": "K_EULER",
"strength1": 1,
"strength2": 1,
"width": 1024
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.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_Nkb**********************************
This is your API token. Keep it to yourself.
Run lucataco/sdxl-img-blend 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": "lucataco/sdxl-img-blend:a755d9a0f404c0a80701a66a16bf8f87e3a8a2ec039b100543a50be3ec90a4d7",
"input": {
"guidance_scale": 7.5,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/JyABinYetxHL1R5cADtbYxqZDEfwQEPl3El6duTXnSBrg6T4/replicate-prediction-qiflk73blyv6qfaxb376exmypi.png",
"image2": "https://replicate.delivery/pbxt/JyABiqwvs4E3IWJZV7Jd7EeMm5ny5iseTiElO6t9d2d1U3oM/replicate-prediction-5p7tdnlbdgchrecubfo5sxb2le.png",
"num_inference_steps": 25,
"scheduler": "K_EULER",
"strength1": 1,
"strength2": 1,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "yppeke3bockz6i3pjbgirbrzym",
"model": "lucataco/sdxl-img-blend",
"version": "a755d9a0f404c0a80701a66a16bf8f87e3a8a2ec039b100543a50be3ec90a4d7",
"input": {
"guidance_scale": 7.5,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/JyABinYetxHL1R5cADtbYxqZDEfwQEPl3El6duTXnSBrg6T4/replicate-prediction-qiflk73blyv6qfaxb376exmypi.png",
"image2": "https://replicate.delivery/pbxt/JyABiqwvs4E3IWJZV7Jd7EeMm5ny5iseTiElO6t9d2d1U3oM/replicate-prediction-5p7tdnlbdgchrecubfo5sxb2le.png",
"num_inference_steps": 25,
"scheduler": "K_EULER",
"strength1": 1,
"strength2": 1,
"width": 1024
},
"logs": "Using seed: 4083018012\n 0%| | 0/55 [00:00<?, ?it/s]\n 56%|█████▋ | 31/55 [00:00<00:00, 309.73it/s]\n100%|██████████| 55/55 [00:00<00:00, 316.55it/s]\nFlavor chain: 0%| | 0/32 [00:00<?, ?it/s]\nFlavor chain: 3%|▎ | 1/32 [00:03<01:41, 3.27s/it]\nFlavor chain: 6%|▋ | 2/32 [00:06<01:38, 3.29s/it]\nFlavor chain: 9%|▉ | 3/32 [00:09<01:36, 3.31s/it]\nFlavor chain: 12%|█▎ | 4/32 [00:13<01:33, 3.33s/it]\nFlavor chain: 16%|█▌ | 5/32 [00:16<01:30, 3.35s/it]\nFlavor chain: 19%|█▉ | 6/32 [00:20<01:27, 3.37s/it]\nFlavor chain: 22%|██▏ | 7/32 [00:23<01:24, 3.38s/it]\nFlavor chain: 25%|██▌ | 8/32 [00:26<01:21, 3.40s/it]\nFlavor chain: 28%|██▊ | 9/32 [00:30<01:18, 3.42s/it]\nFlavor chain: 31%|███▏ | 10/32 [00:33<01:15, 3.44s/it]\nFlavor chain: 34%|███▍ | 11/32 [00:37<01:12, 3.46s/it]\nFlavor chain: 38%|███▊ | 12/32 [00:40<01:09, 3.47s/it]\nFlavor chain: 41%|████ | 13/32 [00:44<01:06, 3.49s/it]\nFlavor chain: 44%|████▍ | 14/32 [00:47<01:03, 3.51s/it]\nFlavor chain: 47%|████▋ | 15/32 [00:51<00:59, 3.52s/it]\nFlavor chain: 47%|████▋ | 15/32 [00:55<01:02, 3.67s/it]\n 0%| | 0/55 [00:00<?, ?it/s]\n 49%|████▉ | 27/55 [00:00<00:00, 261.15it/s]\n 98%|█████████▊| 54/55 [00:00<00:00, 264.69it/s]\n100%|██████████| 55/55 [00:00<00:00, 264.54it/s]\n 0%| | 0/6 [00:00<?, ?it/s]\n100%|██████████| 6/6 [00:00<00:00, 240.31it/s]\n 0%| | 0/50 [00:00<?, ?it/s]\n 66%|██████▌ | 33/50 [00:00<00:00, 321.52it/s]\n100%|██████████| 50/50 [00:00<00:00, 324.78it/s]\n 0%| | 0/55 [00:00<?, ?it/s]\n 56%|█████▋ | 31/55 [00:00<00:00, 305.33it/s]\n100%|██████████| 55/55 [00:00<00:00, 309.67it/s]\nFlavor chain: 0%| | 0/32 [00:00<?, ?it/s]\nFlavor chain: 3%|▎ | 1/32 [00:03<01:42, 3.31s/it]\nFlavor chain: 6%|▋ | 2/32 [00:06<01:41, 3.40s/it]\nFlavor chain: 9%|▉ | 3/32 [00:10<01:40, 3.45s/it]\nFlavor chain: 12%|█▎ | 4/32 [00:13<01:37, 3.48s/it]\nFlavor chain: 16%|█▌ | 5/32 [00:17<01:34, 3.51s/it]\nFlavor chain: 19%|█▉ | 6/32 [00:20<01:31, 3.54s/it]\nFlavor chain: 22%|██▏ | 7/32 [00:24<01:29, 3.56s/it]\nFlavor chain: 25%|██▌ | 8/32 [00:28<01:26, 3.59s/it]\nFlavor chain: 28%|██▊ | 9/32 [00:31<01:23, 3.61s/it]\nFlavor chain: 31%|███▏ | 10/32 [00:35<01:19, 3.63s/it]\nFlavor chain: 34%|███▍ | 11/32 [00:39<01:16, 3.66s/it]\nFlavor chain: 38%|███▊ | 12/32 [00:43<01:13, 3.69s/it]\nFlavor chain: 41%|████ | 13/32 [00:46<01:10, 3.72s/it]\nFlavor chain: 44%|████▍ | 14/32 [00:50<01:07, 3.74s/it]\nFlavor chain: 44%|████▍ | 14/32 [00:54<01:09, 3.89s/it]\n 0%| | 0/55 [00:00<?, ?it/s]\n 47%|████▋ | 26/55 [00:00<00:00, 255.73it/s]\n 96%|█████████▋| 53/55 [00:00<00:00, 261.82it/s]\n100%|██████████| 55/55 [00:00<00:00, 261.77it/s]\n 0%| | 0/6 [00:00<?, ?it/s]\n100%|██████████| 6/6 [00:00<00:00, 236.08it/s]\n 0%| | 0/50 [00:00<?, ?it/s]\n 66%|██████▌ | 33/50 [00:00<00:00, 320.11it/s]\n100%|██████████| 50/50 [00:00<00:00, 324.13it/s]\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|▍ | 1/25 [00:00<00:04, 5.01it/s]\n 8%|▊ | 2/25 [00:00<00:04, 4.97it/s]\n 12%|█▏ | 3/25 [00:00<00:04, 4.96it/s]\n 16%|█▌ | 4/25 [00:00<00:04, 4.96it/s]\n 20%|██ | 5/25 [00:01<00:04, 4.93it/s]\n 24%|██▍ | 6/25 [00:01<00:03, 4.93it/s]\n 28%|██▊ | 7/25 [00:01<00:03, 4.94it/s]\n 32%|███▏ | 8/25 [00:01<00:03, 4.93it/s]\n 36%|███▌ | 9/25 [00:01<00:03, 4.93it/s]\n 40%|████ | 10/25 [00:02<00:03, 4.92it/s]\n 44%|████▍ | 11/25 [00:02<00:02, 4.92it/s]\n 48%|████▊ | 12/25 [00:02<00:02, 4.93it/s]\n 52%|█████▏ | 13/25 [00:02<00:02, 4.93it/s]\n 56%|█████▌ | 14/25 [00:02<00:02, 4.93it/s]\n 60%|██████ | 15/25 [00:03<00:02, 4.92it/s]\n 64%|██████▍ | 16/25 [00:03<00:01, 4.92it/s]\n 68%|██████▊ | 17/25 [00:03<00:01, 4.92it/s]\n 72%|███████▏ | 18/25 [00:03<00:01, 4.92it/s]\n 76%|███████▌ | 19/25 [00:03<00:01, 4.93it/s]\n 80%|████████ | 20/25 [00:04<00:01, 4.93it/s]\n 84%|████████▍ | 21/25 [00:04<00:00, 4.92it/s]\n 88%|████████▊ | 22/25 [00:04<00:00, 4.92it/s]\n 92%|█████████▏| 23/25 [00:04<00:00, 4.92it/s]\n 96%|█████████▌| 24/25 [00:04<00:00, 4.92it/s]\n100%|██████████| 25/25 [00:05<00:00, 4.92it/s]\n100%|██████████| 25/25 [00:05<00:00, 4.93it/s]",
"output": "https://replicate.delivery/pbxt/wJm6EiNKMDoqBNFe59jwuete0cQkheyMfvHtFHyIdG7TFdtPC/output.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-30T22:07:47.50619Z",
"started_at": "2023-11-30T22:07:47.543799Z",
"completed_at": "2023-11-30T22:09:47.666744Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/yppeke3bockz6i3pjbgirbrzym/cancel",
"get": "https://api.replicate.com/v1/predictions/yppeke3bockz6i3pjbgirbrzym"
},
"metrics": {
"predict_time": 120.122945,
"total_time": 120.160554
}
}

