You're looking at a specific version of this model. Jump to the model overview.
lucataco /diffusionlight:958d6f03
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 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: {
image: "https://replicate.delivery/pbxt/KJoKQAifOmk7YFHsSVzSabOJdgjb6QXrgyjSCh3rskrUK32a/ski.jpeg",
prompt: "a perfect mirrored reflective chrome ball sphere",
negative_prompt: "matte, diffuse, flat, dull",
num_inference_steps: 30,
controlnet_conditioning_scale: 0.5
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
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={
"image": "https://replicate.delivery/pbxt/KJoKQAifOmk7YFHsSVzSabOJdgjb6QXrgyjSCh3rskrUK32a/ski.jpeg",
"prompt": "a perfect mirrored reflective chrome ball sphere",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"controlnet_conditioning_scale": 0.5
}
)
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 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": {
"image": "https://replicate.delivery/pbxt/KJoKQAifOmk7YFHsSVzSabOJdgjb6QXrgyjSCh3rskrUK32a/ski.jpeg",
"prompt": "a perfect mirrored reflective chrome ball sphere",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"controlnet_conditioning_scale": 0.5
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/lucataco/diffusionlight@sha256:958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef \
-i 'image="https://replicate.delivery/pbxt/KJoKQAifOmk7YFHsSVzSabOJdgjb6QXrgyjSCh3rskrUK32a/ski.jpeg"' \
-i 'prompt="a perfect mirrored reflective chrome ball sphere"' \
-i 'negative_prompt="matte, diffuse, flat, dull"' \
-i 'num_inference_steps=30' \
-i 'controlnet_conditioning_scale=0.5'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/lucataco/diffusionlight@sha256:958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KJoKQAifOmk7YFHsSVzSabOJdgjb6QXrgyjSCh3rskrUK32a/ski.jpeg", "prompt": "a perfect mirrored reflective chrome ball sphere", "negative_prompt": "matte, diffuse, flat, dull", "num_inference_steps": 30, "controlnet_conditioning_scale": 0.5 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.014. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-01-30T21:51:51.655582Z",
"created_at": "2024-01-30T21:49:10.599328Z",
"data_removed": false,
"error": null,
"id": "c3twa5lb3dphdu5rhzrf5lqngm",
"input": {
"image": "https://replicate.delivery/pbxt/KJoKQAifOmk7YFHsSVzSabOJdgjb6QXrgyjSCh3rskrUK32a/ski.jpeg",
"prompt": "a perfect mirrored reflective chrome ball sphere",
"negative_prompt": "matte, diffuse, flat, dull",
"num_inference_steps": 30,
"controlnet_conditioning_scale": 0.5
},
"logs": "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)\nreturn _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n 0%| | 0/29 [00:00<?, ?it/s]\n 3%|▎ | 1/29 [00:00<00:10, 2.72it/s]\n 7%|▋ | 2/29 [00:00<00:08, 3.09it/s]\n 10%|█ | 3/29 [00:00<00:08, 3.19it/s]\n 14%|█▍ | 4/29 [00:01<00:07, 3.27it/s]\n 17%|█▋ | 5/29 [00:01<00:07, 3.32it/s]\n 21%|██ | 6/29 [00:01<00:06, 3.34it/s]\n 24%|██▍ | 7/29 [00:02<00:06, 3.36it/s]\n 28%|██▊ | 8/29 [00:02<00:06, 3.37it/s]\n 31%|███ | 9/29 [00:02<00:05, 3.38it/s]\n 34%|███▍ | 10/29 [00:03<00:05, 3.38it/s]\n 38%|███▊ | 11/29 [00:03<00:05, 3.38it/s]\n 41%|████▏ | 12/29 [00:03<00:05, 3.39it/s]\n 45%|████▍ | 13/29 [00:03<00:04, 3.39it/s]\n 48%|████▊ | 14/29 [00:04<00:04, 3.39it/s]\n 52%|█████▏ | 15/29 [00:04<00:04, 3.39it/s]\n 55%|█████▌ | 16/29 [00:04<00:03, 3.39it/s]\n 59%|█████▊ | 17/29 [00:05<00:03, 3.38it/s]\n 62%|██████▏ | 18/29 [00:05<00:03, 3.38it/s]\n 66%|██████▌ | 19/29 [00:05<00:02, 3.38it/s]\n 69%|██████▉ | 20/29 [00:05<00:02, 3.38it/s]\n 72%|███████▏ | 21/29 [00:06<00:02, 3.38it/s]\n 76%|███████▌ | 22/29 [00:06<00:02, 3.38it/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.38it/s]\n 93%|█████████▎| 27/29 [00:08<00:00, 3.38it/s]\n 97%|█████████▋| 28/29 [00:08<00:00, 3.37it/s]\n100%|██████████| 29/29 [00:08<00:00, 3.37it/s]\n100%|██████████| 29/29 [00:08<00:00, 3.35it/s]",
"metrics": {
"predict_time": 12.652394,
"total_time": 161.056254
},
"output": "https://replicate.delivery/pbxt/Vkrkqo4CIxqVGNHcZy6EGY11W5KaBuu6ggRYeFsJ5fN3FyRSA/output.png",
"started_at": "2024-01-30T21:51:39.003188Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/c3twa5lb3dphdu5rhzrf5lqngm",
"cancel": "https://api.replicate.com/v1/predictions/c3twa5lb3dphdu5rhzrf5lqngm/cancel"
},
"version": "958d6f0315da9b86f74ca6a67b8cafa1b44b4b6330f0385d956da171ec02e5ef"
}
/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
0%| | 0/29 [00:00<?, ?it/s]
3%|▎ | 1/29 [00:00<00:10, 2.72it/s]
7%|▋ | 2/29 [00:00<00:08, 3.09it/s]
10%|█ | 3/29 [00:00<00:08, 3.19it/s]
14%|█▍ | 4/29 [00:01<00:07, 3.27it/s]
17%|█▋ | 5/29 [00:01<00:07, 3.32it/s]
21%|██ | 6/29 [00:01<00:06, 3.34it/s]
24%|██▍ | 7/29 [00:02<00:06, 3.36it/s]
28%|██▊ | 8/29 [00:02<00:06, 3.37it/s]
31%|███ | 9/29 [00:02<00:05, 3.38it/s]
34%|███▍ | 10/29 [00:03<00:05, 3.38it/s]
38%|███▊ | 11/29 [00:03<00:05, 3.38it/s]
41%|████▏ | 12/29 [00:03<00:05, 3.39it/s]
45%|████▍ | 13/29 [00:03<00:04, 3.39it/s]
48%|████▊ | 14/29 [00:04<00:04, 3.39it/s]
52%|█████▏ | 15/29 [00:04<00:04, 3.39it/s]
55%|█████▌ | 16/29 [00:04<00:03, 3.39it/s]
59%|█████▊ | 17/29 [00:05<00:03, 3.38it/s]
62%|██████▏ | 18/29 [00:05<00:03, 3.38it/s]
66%|██████▌ | 19/29 [00:05<00:02, 3.38it/s]
69%|██████▉ | 20/29 [00:05<00:02, 3.38it/s]
72%|███████▏ | 21/29 [00:06<00:02, 3.38it/s]
76%|███████▌ | 22/29 [00:06<00:02, 3.38it/s]
79%|███████▉ | 23/29 [00:06<00:01, 3.38it/s]
83%|████████▎ | 24/29 [00:07<00:01, 3.38it/s]
86%|████████▌ | 25/29 [00:07<00:01, 3.38it/s]
90%|████████▉ | 26/29 [00:07<00:00, 3.38it/s]
93%|█████████▎| 27/29 [00:08<00:00, 3.38it/s]
97%|█████████▋| 28/29 [00:08<00:00, 3.37it/s]
100%|██████████| 29/29 [00:08<00:00, 3.37it/s]
100%|██████████| 29/29 [00:08<00:00, 3.35it/s]