Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
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 fofr/illusions using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/illusions:579b32db82b24584c3c6155fe3ae12e8fce50ba28b575c23e8a1f5f3a5e99ed8",
{
input: {
seed: -1,
image: "https://replicate.delivery/pbxt/JouANiZNiW2mwouIgIk1VySvjL9MBmaPD6Ib8HyfW81CJzRR/out-0-44.png",
width: 768,
height: 768,
prompt: "a painting of a 19th century town",
num_outputs: 1,
control_image: "https://replicate.delivery/pbxt/JouAO2zaHgb66YVChJagSYz0LcGqv3QgG4BS71mioFbBHWTZ/spiral_black_transparent-2513050263.jpg",
controlnet_end: 1,
guidance_scale: 7.5,
negative_prompt: "ugly, disfigured, low quality, blurry, nsfw",
prompt_strength: 0.75,
sizing_strategy: "width/height",
controlnet_start: 0,
num_inference_steps: 40,
controlnet_conditioning_scale: 0.75
}
}
);
console.log(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 fofr/illusions using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/illusions:579b32db82b24584c3c6155fe3ae12e8fce50ba28b575c23e8a1f5f3a5e99ed8",
input={
"seed": -1,
"image": "https://replicate.delivery/pbxt/JouANiZNiW2mwouIgIk1VySvjL9MBmaPD6Ib8HyfW81CJzRR/out-0-44.png",
"width": 768,
"height": 768,
"prompt": "a painting of a 19th century town",
"num_outputs": 1,
"control_image": "https://replicate.delivery/pbxt/JouAO2zaHgb66YVChJagSYz0LcGqv3QgG4BS71mioFbBHWTZ/spiral_black_transparent-2513050263.jpg",
"controlnet_end": 1,
"guidance_scale": 7.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"prompt_strength": 0.75,
"sizing_strategy": "width/height",
"controlnet_start": 0,
"num_inference_steps": 40,
"controlnet_conditioning_scale": 0.75
}
)
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 fofr/illusions 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": "579b32db82b24584c3c6155fe3ae12e8fce50ba28b575c23e8a1f5f3a5e99ed8",
"input": {
"seed": -1,
"image": "https://replicate.delivery/pbxt/JouANiZNiW2mwouIgIk1VySvjL9MBmaPD6Ib8HyfW81CJzRR/out-0-44.png",
"width": 768,
"height": 768,
"prompt": "a painting of a 19th century town",
"num_outputs": 1,
"control_image": "https://replicate.delivery/pbxt/JouAO2zaHgb66YVChJagSYz0LcGqv3QgG4BS71mioFbBHWTZ/spiral_black_transparent-2513050263.jpg",
"controlnet_end": 1,
"guidance_scale": 7.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"prompt_strength": 0.75,
"sizing_strategy": "width/height",
"controlnet_start": 0,
"num_inference_steps": 40,
"controlnet_conditioning_scale": 0.75
}
}' \
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": "2024-11-28T11:32:22.900851Z",
"created_at": "2024-11-28T11:30:20.911000Z",
"data_removed": false,
"error": null,
"id": "w1v5b6acdxrm80ckea4tmdbenc",
"input": {
"seed": -1,
"image": "https://replicate.delivery/pbxt/JouANiZNiW2mwouIgIk1VySvjL9MBmaPD6Ib8HyfW81CJzRR/out-0-44.png",
"width": 768,
"height": 768,
"prompt": "a painting of a 19th century town",
"num_outputs": 1,
"control_image": "https://replicate.delivery/pbxt/JouAO2zaHgb66YVChJagSYz0LcGqv3QgG4BS71mioFbBHWTZ/spiral_black_transparent-2513050263.jpg",
"controlnet_end": 1,
"guidance_scale": 7.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"prompt_strength": 0.75,
"sizing_strategy": "width/height",
"controlnet_start": 0,
"num_inference_steps": 40,
"controlnet_conditioning_scale": 0.75
},
"logs": "Using seed: 2467422454\nimg2img mode\nUsing given dimensions\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:06, 4.34it/s]\n 10%|█ | 3/30 [00:00<00:02, 9.44it/s]\n 17%|█▋ | 5/30 [00:00<00:02, 11.96it/s]\n 23%|██▎ | 7/30 [00:00<00:01, 13.41it/s]\n 30%|███ | 9/30 [00:00<00:01, 14.32it/s]\n 37%|███▋ | 11/30 [00:00<00:01, 14.89it/s]\n 43%|████▎ | 13/30 [00:00<00:01, 15.25it/s]\n 50%|█████ | 15/30 [00:01<00:00, 15.48it/s]\n 57%|█████▋ | 17/30 [00:01<00:00, 15.66it/s]\n 63%|██████▎ | 19/30 [00:01<00:00, 15.78it/s]\n 70%|███████ | 21/30 [00:01<00:00, 15.85it/s]\n 77%|███████▋ | 23/30 [00:01<00:00, 15.88it/s]\n 83%|████████▎ | 25/30 [00:01<00:00, 15.91it/s]\n 90%|█████████ | 27/30 [00:01<00:00, 15.96it/s]\n 97%|█████████▋| 29/30 [00:01<00:00, 15.99it/s]\n100%|██████████| 30/30 [00:02<00:00, 14.71it/s]",
"metrics": {
"predict_time": 2.954102423,
"total_time": 121.989851
},
"output": [
"https://replicate.delivery/xezq/EZzDUXEEDm4feUeebNHJk9nqpCDNffRkCRRpueCnwdvfGbg1TA/output-0.png"
],
"started_at": "2024-11-28T11:32:19.946748Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-dpj35fmfxv5fb5zm4yirhor24m3ptmog5fxviqlg3sppbnisgxsq",
"get": "https://api.replicate.com/v1/predictions/w1v5b6acdxrm80ckea4tmdbenc",
"cancel": "https://api.replicate.com/v1/predictions/w1v5b6acdxrm80ckea4tmdbenc/cancel"
},
"version": "579b32db82b24584c3c6155fe3ae12e8fce50ba28b575c23e8a1f5f3a5e99ed8"
}
Using seed: 2467422454
img2img mode
Using given dimensions
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:06, 4.34it/s]
10%|█ | 3/30 [00:00<00:02, 9.44it/s]
17%|█▋ | 5/30 [00:00<00:02, 11.96it/s]
23%|██▎ | 7/30 [00:00<00:01, 13.41it/s]
30%|███ | 9/30 [00:00<00:01, 14.32it/s]
37%|███▋ | 11/30 [00:00<00:01, 14.89it/s]
43%|████▎ | 13/30 [00:00<00:01, 15.25it/s]
50%|█████ | 15/30 [00:01<00:00, 15.48it/s]
57%|█████▋ | 17/30 [00:01<00:00, 15.66it/s]
63%|██████▎ | 19/30 [00:01<00:00, 15.78it/s]
70%|███████ | 21/30 [00:01<00:00, 15.85it/s]
77%|███████▋ | 23/30 [00:01<00:00, 15.88it/s]
83%|████████▎ | 25/30 [00:01<00:00, 15.91it/s]
90%|█████████ | 27/30 [00:01<00:00, 15.96it/s]
97%|█████████▋| 29/30 [00:01<00:00, 15.99it/s]
100%|██████████| 30/30 [00:02<00:00, 14.71it/s]