typefile
{
"controlnet_conditioning_scale": 0.5,
"image": "https://replicate.delivery/pbxt/KJoRu8KEOxkJq4rtVV3kEga53JZj7iXtActgz9Lfe36M6Xa0/temple.png",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"prompt": "a perfect mirrored reflective chrome ball sphere"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_SOb**********************************
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/diffusionlight using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/diffusionlight:958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef",
{
input: {
controlnet_conditioning_scale: 0.5,
image: "https://replicate.delivery/pbxt/KJoRu8KEOxkJq4rtVV3kEga53JZj7iXtActgz9Lfe36M6Xa0/temple.png",
negative_prompt: "matte, diffuse, flat, dull",
num_inference_steps: 30,
prompt: "a perfect mirrored reflective chrome ball sphere"
}
}
);
// 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_SOb**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/diffusionlight using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/diffusionlight:958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef",
input={
"controlnet_conditioning_scale": 0.5,
"image": "https://replicate.delivery/pbxt/KJoRu8KEOxkJq4rtVV3kEga53JZj7iXtActgz9Lfe36M6Xa0/temple.png",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"prompt": "a perfect mirrored reflective chrome ball sphere"
}
)
# 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_SOb**********************************
This is your API token. Keep it to yourself.
Run lucataco/diffusionlight 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/diffusionlight:958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef",
"input": {
"controlnet_conditioning_scale": 0.5,
"image": "https://replicate.delivery/pbxt/KJoRu8KEOxkJq4rtVV3kEga53JZj7iXtActgz9Lfe36M6Xa0/temple.png",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"prompt": "a perfect mirrored reflective chrome ball sphere"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "rmgafv3bwvpjrcyhsryzumunky",
"model": "lucataco/diffusionlight",
"version": "958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef",
"input": {
"controlnet_conditioning_scale": 0.5,
"image": "https://replicate.delivery/pbxt/KJoRu8KEOxkJq4rtVV3kEga53JZj7iXtActgz9Lfe36M6Xa0/temple.png",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"prompt": "a perfect mirrored reflective chrome ball sphere"
},
"logs": "0%| | 0/29 [00:00<?, ?it/s]\n 3%|▎ | 1/29 [00:00<00:08, 3.39it/s]\n 7%|▋ | 2/29 [00:00<00:07, 3.38it/s]\n 10%|█ | 3/29 [00:00<00:07, 3.38it/s]\n 14%|█▍ | 4/29 [00:01<00:07, 3.38it/s]\n 17%|█▋ | 5/29 [00:01<00:07, 3.37it/s]\n 21%|██ | 6/29 [00:01<00:06, 3.37it/s]\n 24%|██▍ | 7/29 [00:02<00:06, 3.37it/s]\n 28%|██▊ | 8/29 [00:02<00:06, 3.37it/s]\n 31%|███ | 9/29 [00:02<00:05, 3.37it/s]\n 34%|███▍ | 10/29 [00:02<00:05, 3.37it/s]\n 38%|███▊ | 11/29 [00:03<00:05, 3.37it/s]\n 41%|████▏ | 12/29 [00:03<00:05, 3.37it/s]\n 45%|████▍ | 13/29 [00:03<00:04, 3.37it/s]\n 48%|████▊ | 14/29 [00:04<00:04, 3.38it/s]\n 52%|█████▏ | 15/29 [00:04<00:04, 3.38it/s]\n 55%|█████▌ | 16/29 [00:04<00:03, 3.38it/s]\n 59%|█████▊ | 17/29 [00:05<00:03, 3.38it/s]\n 62%|██████▏ | 18/29 [00:05<00:03, 3.39it/s]\n 66%|██████▌ | 19/29 [00:05<00:02, 3.39it/s]\n 69%|██████▉ | 20/29 [00:05<00:02, 3.39it/s]\n 72%|███████▏ | 21/29 [00:06<00:02, 3.39it/s]\n 76%|███████▌ | 22/29 [00:06<00:02, 3.39it/s]\n 79%|███████▉ | 23/29 [00:06<00:01, 3.38it/s]\n 83%|████████▎ | 24/29 [00:07<00:01, 3.38it/s]\n 86%|████████▌ | 25/29 [00:07<00:01, 3.38it/s]\n 90%|████████▉ | 26/29 [00:07<00:00, 3.39it/s]\n 93%|█████████▎| 27/29 [00:07<00:00, 3.38it/s]\n 97%|█████████▋| 28/29 [00:08<00:00, 3.38it/s]\n100%|██████████| 29/29 [00:08<00:00, 3.39it/s]\n100%|██████████| 29/29 [00:08<00:00, 3.38it/s]",
"output": "https://replicate.delivery/pbxt/weKcHtMwx5X9FCvkzkh7RnOW9yQ1DcgxxPXpIm7lKX7TD5IJA/output.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-01-30T21:52:26.321345Z",
"started_at": "2024-01-30T21:52:26.333843Z",
"completed_at": "2024-01-30T21:52:40.33514Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/rmgafv3bwvpjrcyhsryzumunky/cancel",
"get": "https://api.replicate.com/v1/predictions/rmgafv3bwvpjrcyhsryzumunky"
},
"metrics": {
"predict_time": 14.001297,
"total_time": 14.013795
}
}
