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.
moayedhajiali /elasticdiffusion:bddc0936
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 moayedhajiali/elasticdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"moayedhajiali/elasticdiffusion:bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88",
{
input: {
seed: 0,
prompt: "Envision an ostrich in the dessert. she has a green scarf wrapping her body. her eyes are dark black. her attire, simple yet dignified",
img_width: 2048,
rrg_scale: 1000,
img_height: 1024,
cosine_scale: 10,
guidance_scale: 10,
view_batch_size: 16,
negative_prompts: "blurry, ugly, poorly drawn, deformed",
resampling_new_p: 0.3,
resampling_steps: 7,
num_inference_steps: 50
}
}
);
// 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 moayedhajiali/elasticdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"moayedhajiali/elasticdiffusion:bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88",
input={
"seed": 0,
"prompt": "Envision an ostrich in the dessert. she has a green scarf wrapping her body. her eyes are dark black. her attire, simple yet dignified",
"img_width": 2048,
"rrg_scale": 1000,
"img_height": 1024,
"cosine_scale": 10,
"guidance_scale": 10,
"view_batch_size": 16,
"negative_prompts": "blurry, ugly, poorly drawn, deformed",
"resampling_new_p": 0.3,
"resampling_steps": 7,
"num_inference_steps": 50
}
)
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 moayedhajiali/elasticdiffusion 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": "bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88",
"input": {
"seed": 0,
"prompt": "Envision an ostrich in the dessert. she has a green scarf wrapping her body. her eyes are dark black. her attire, simple yet dignified",
"img_width": 2048,
"rrg_scale": 1000,
"img_height": 1024,
"cosine_scale": 10,
"guidance_scale": 10,
"view_batch_size": 16,
"negative_prompts": "blurry, ugly, poorly drawn, deformed",
"resampling_new_p": 0.3,
"resampling_steps": 7,
"num_inference_steps": 50
}
}' \
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": "2023-12-27T20:02:25.201417Z",
"created_at": "2023-12-27T19:53:55.659596Z",
"data_removed": false,
"error": null,
"id": "epwajtdbsw3vgzk7odton2nqnm",
"input": {
"seed": 0,
"prompt": "Envision an ostrich in the dessert. she has a green scarf wrapping her body. her eyes are dark black. her attire, simple yet dignified",
"img_width": 2048,
"rrg_scale": 1000,
"img_height": 1024,
"cosine_scale": 10,
"guidance_scale": 10,
"view_batch_size": 16,
"negative_prompts": "blurry, ugly, poorly drawn, deformed",
"resampling_new_p": 0.3,
"resampling_steps": 7,
"num_inference_steps": 50
},
"logs": "0%| | 0/50 [00:00<?, ?it/s]/src/elastic_diffusion.py:502: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').\nsampled_h = (idx_h * downsample_factor + random_indices.reshape(idx_h.shape[0], idx_h.shape[1]) // downsample_factor).view(-1)\n 2%|▏ | 1/50 [00:05<04:52, 5.97s/it]\n 4%|▍ | 2/50 [00:11<04:45, 5.94s/it]\n 6%|▌ | 3/50 [00:17<04:38, 5.92s/it]\n 8%|▊ | 4/50 [00:23<04:32, 5.92s/it]\n 10%|█ | 5/50 [00:29<04:26, 5.92s/it]\n 12%|█▏ | 6/50 [00:35<04:20, 5.92s/it]\n 14%|█▍ | 7/50 [00:41<04:14, 5.92s/it]\n 16%|█▌ | 8/50 [00:47<04:08, 5.92s/it]\n 18%|█▊ | 9/50 [00:53<04:02, 5.92s/it]\n 20%|██ | 10/50 [00:59<03:57, 5.93s/it]\n 22%|██▏ | 11/50 [01:05<03:51, 5.93s/it]\n 24%|██▍ | 12/50 [01:11<03:45, 5.93s/it]\n 26%|██▌ | 13/50 [01:17<03:39, 5.93s/it]\n 28%|██▊ | 14/50 [01:22<03:33, 5.93s/it]\n 30%|███ | 15/50 [01:28<03:27, 5.93s/it]\n 32%|███▏ | 16/50 [01:34<03:21, 5.93s/it]\n 34%|███▍ | 17/50 [01:40<03:15, 5.93s/it]\n 36%|███▌ | 18/50 [01:46<03:09, 5.93s/it]\n 38%|███▊ | 19/50 [01:52<03:03, 5.93s/it]\n 40%|████ | 20/50 [01:58<02:58, 5.94s/it]\n 42%|████▏ | 21/50 [02:04<02:52, 5.94s/it]\n 44%|████▍ | 22/50 [02:10<02:46, 5.94s/it]\n 46%|████▌ | 23/50 [02:16<02:40, 5.94s/it]\n 48%|████▊ | 24/50 [02:22<02:34, 5.94s/it]\n 50%|█████ | 25/50 [02:28<02:28, 5.94s/it]\n 52%|█████▏ | 26/50 [02:34<02:22, 5.94s/it]\n 54%|█████▍ | 27/50 [02:40<02:16, 5.94s/it]\n 56%|█████▌ | 28/50 [02:46<02:10, 5.94s/it]\n 58%|█████▊ | 29/50 [02:52<02:04, 5.94s/it]\n 60%|██████ | 30/50 [02:58<01:58, 5.94s/it]\n 62%|██████▏ | 31/50 [03:03<01:52, 5.94s/it]\n 64%|██████▍ | 32/50 [03:09<01:46, 5.94s/it]\n 66%|██████▌ | 33/50 [03:15<01:41, 5.95s/it]\n 68%|██████▊ | 34/50 [03:21<01:35, 5.95s/it]\n 70%|███████ | 35/50 [03:27<01:29, 5.95s/it]\n 72%|███████▏ | 36/50 [03:33<01:23, 5.94s/it]\n 74%|███████▍ | 37/50 [03:39<01:17, 5.94s/it]\n 76%|███████▌ | 38/50 [03:45<01:11, 5.95s/it]\n 78%|███████▊ | 39/50 [03:51<01:05, 5.94s/it]\n 80%|████████ | 40/50 [03:57<00:59, 5.94s/it]\n 82%|████████▏ | 41/50 [04:03<00:53, 5.94s/it]\n 84%|████████▍ | 42/50 [04:09<00:47, 5.94s/it]\n 86%|████████▌ | 43/50 [04:15<00:41, 5.94s/it]\n 88%|████████▊ | 44/50 [04:21<00:35, 5.94s/it]\n 90%|█████████ | 45/50 [04:27<00:29, 5.94s/it]\n 92%|█████████▏| 46/50 [04:33<00:23, 5.94s/it]\n 94%|█████████▍| 47/50 [04:39<00:17, 5.94s/it]\n 96%|█████████▌| 48/50 [04:45<00:11, 5.94s/it]\n 98%|█████████▊| 49/50 [04:50<00:05, 5.94s/it]\n100%|██████████| 50/50 [04:55<00:00, 5.57s/it]\n100%|██████████| 50/50 [04:55<00:00, 5.91s/it]\n[INFO] Time taken: 296.53521728515625 seconds.",
"metrics": {
"predict_time": 298.256037,
"total_time": 509.541821
},
"output": "https://replicate.delivery/pbxt/ZXaIgD8FnIYQMBBMAeVa59ew7vD2CoGSYKOTVweKtVeDNNaIB/result.png",
"started_at": "2023-12-27T19:57:26.945380Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/epwajtdbsw3vgzk7odton2nqnm",
"cancel": "https://api.replicate.com/v1/predictions/epwajtdbsw3vgzk7odton2nqnm/cancel"
},
"version": "bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88"
}
0%| | 0/50 [00:00<?, ?it/s]/src/elastic_diffusion.py:502: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
sampled_h = (idx_h * downsample_factor + random_indices.reshape(idx_h.shape[0], idx_h.shape[1]) // downsample_factor).view(-1)
2%|▏ | 1/50 [00:05<04:52, 5.97s/it]
4%|▍ | 2/50 [00:11<04:45, 5.94s/it]
6%|▌ | 3/50 [00:17<04:38, 5.92s/it]
8%|▊ | 4/50 [00:23<04:32, 5.92s/it]
10%|█ | 5/50 [00:29<04:26, 5.92s/it]
12%|█▏ | 6/50 [00:35<04:20, 5.92s/it]
14%|█▍ | 7/50 [00:41<04:14, 5.92s/it]
16%|█▌ | 8/50 [00:47<04:08, 5.92s/it]
18%|█▊ | 9/50 [00:53<04:02, 5.92s/it]
20%|██ | 10/50 [00:59<03:57, 5.93s/it]
22%|██▏ | 11/50 [01:05<03:51, 5.93s/it]
24%|██▍ | 12/50 [01:11<03:45, 5.93s/it]
26%|██▌ | 13/50 [01:17<03:39, 5.93s/it]
28%|██▊ | 14/50 [01:22<03:33, 5.93s/it]
30%|███ | 15/50 [01:28<03:27, 5.93s/it]
32%|███▏ | 16/50 [01:34<03:21, 5.93s/it]
34%|███▍ | 17/50 [01:40<03:15, 5.93s/it]
36%|███▌ | 18/50 [01:46<03:09, 5.93s/it]
38%|███▊ | 19/50 [01:52<03:03, 5.93s/it]
40%|████ | 20/50 [01:58<02:58, 5.94s/it]
42%|████▏ | 21/50 [02:04<02:52, 5.94s/it]
44%|████▍ | 22/50 [02:10<02:46, 5.94s/it]
46%|████▌ | 23/50 [02:16<02:40, 5.94s/it]
48%|████▊ | 24/50 [02:22<02:34, 5.94s/it]
50%|█████ | 25/50 [02:28<02:28, 5.94s/it]
52%|█████▏ | 26/50 [02:34<02:22, 5.94s/it]
54%|█████▍ | 27/50 [02:40<02:16, 5.94s/it]
56%|█████▌ | 28/50 [02:46<02:10, 5.94s/it]
58%|█████▊ | 29/50 [02:52<02:04, 5.94s/it]
60%|██████ | 30/50 [02:58<01:58, 5.94s/it]
62%|██████▏ | 31/50 [03:03<01:52, 5.94s/it]
64%|██████▍ | 32/50 [03:09<01:46, 5.94s/it]
66%|██████▌ | 33/50 [03:15<01:41, 5.95s/it]
68%|██████▊ | 34/50 [03:21<01:35, 5.95s/it]
70%|███████ | 35/50 [03:27<01:29, 5.95s/it]
72%|███████▏ | 36/50 [03:33<01:23, 5.94s/it]
74%|███████▍ | 37/50 [03:39<01:17, 5.94s/it]
76%|███████▌ | 38/50 [03:45<01:11, 5.95s/it]
78%|███████▊ | 39/50 [03:51<01:05, 5.94s/it]
80%|████████ | 40/50 [03:57<00:59, 5.94s/it]
82%|████████▏ | 41/50 [04:03<00:53, 5.94s/it]
84%|████████▍ | 42/50 [04:09<00:47, 5.94s/it]
86%|████████▌ | 43/50 [04:15<00:41, 5.94s/it]
88%|████████▊ | 44/50 [04:21<00:35, 5.94s/it]
90%|█████████ | 45/50 [04:27<00:29, 5.94s/it]
92%|█████████▏| 46/50 [04:33<00:23, 5.94s/it]
94%|█████████▍| 47/50 [04:39<00:17, 5.94s/it]
96%|█████████▌| 48/50 [04:45<00:11, 5.94s/it]
98%|█████████▊| 49/50 [04:50<00:05, 5.94s/it]
100%|██████████| 50/50 [04:55<00:00, 5.57s/it]
100%|██████████| 50/50 [04:55<00:00, 5.91s/it]
[INFO] Time taken: 296.53521728515625 seconds.