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: "A front view of a beautiful waterfall",
img_width: 2048,
rrg_scale: 1000,
img_height: 512,
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": "A front view of a beautiful waterfall",
"img_width": 2048,
"rrg_scale": 1000,
"img_height": 512,
"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": "A front view of a beautiful waterfall",
"img_width": 2048,
"rrg_scale": 1000,
"img_height": 512,
"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.
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/moayedhajiali/elasticdiffusion@sha256:bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88 \
-i 'seed=0' \
-i 'prompt="A front view of a beautiful waterfall"' \
-i 'img_width=2048' \
-i 'rrg_scale=1000' \
-i 'img_height=512' \
-i 'cosine_scale=10' \
-i 'guidance_scale=10' \
-i 'view_batch_size=16' \
-i 'negative_prompts="blurry, ugly, poorly drawn, deformed"' \
-i 'resampling_new_p=0.3' \
-i 'resampling_steps=7' \
-i 'num_inference_steps=50'
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/moayedhajiali/elasticdiffusion@sha256:bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": 0, "prompt": "A front view of a beautiful waterfall", "img_width": 2048, "rrg_scale": 1000, "img_height": 512, "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 } }' \ 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.50. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-12-28T04:14:40.379623Z",
"created_at": "2023-12-28T04:09:12.956407Z",
"data_removed": false,
"error": null,
"id": "arekedtbs2ou7zjfjvbokqkssm",
"input": {
"seed": 0,
"prompt": "A front view of a beautiful waterfall",
"img_width": 2048,
"rrg_scale": 1000,
"img_height": 512,
"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]\n 2%|▏ | 1/50 [00:06<05:20, 6.54s/it]\n 4%|▍ | 2/50 [00:13<05:13, 6.53s/it]\n 6%|▌ | 3/50 [00:19<05:06, 6.53s/it]\n 8%|▊ | 4/50 [00:26<05:00, 6.53s/it]\n 10%|█ | 5/50 [00:32<04:53, 6.53s/it]\n 12%|█▏ | 6/50 [00:39<04:47, 6.53s/it]\n 14%|█▍ | 7/50 [00:45<04:40, 6.53s/it]\n 16%|█▌ | 8/50 [00:52<04:34, 6.54s/it]\n 18%|█▊ | 9/50 [00:58<04:28, 6.54s/it]\n 20%|██ | 10/50 [01:05<04:21, 6.54s/it]\n 22%|██▏ | 11/50 [01:11<04:14, 6.54s/it]\n 24%|██▍ | 12/50 [01:18<04:08, 6.54s/it]\n 26%|██▌ | 13/50 [01:24<04:01, 6.54s/it]\n 28%|██▊ | 14/50 [01:31<03:55, 6.54s/it]\n 30%|███ | 15/50 [01:38<03:48, 6.54s/it]\n 32%|███▏ | 16/50 [01:44<03:42, 6.54s/it]\n 34%|███▍ | 17/50 [01:51<03:35, 6.54s/it]\n 36%|███▌ | 18/50 [01:57<03:29, 6.54s/it]\n 38%|███▊ | 19/50 [02:04<03:22, 6.54s/it]\n 40%|████ | 20/50 [02:10<03:16, 6.54s/it]\n 42%|████▏ | 21/50 [02:17<03:09, 6.54s/it]\n 44%|████▍ | 22/50 [02:23<03:03, 6.54s/it]\n 46%|████▌ | 23/50 [02:30<02:56, 6.54s/it]\n 48%|████▊ | 24/50 [02:36<02:50, 6.54s/it]\n 50%|█████ | 25/50 [02:43<02:43, 6.54s/it]\n 52%|█████▏ | 26/50 [02:49<02:36, 6.54s/it]\n 54%|█████▍ | 27/50 [02:56<02:30, 6.54s/it]\n 56%|█████▌ | 28/50 [03:03<02:23, 6.54s/it]\n 58%|█████▊ | 29/50 [03:09<02:17, 6.54s/it]\n 60%|██████ | 30/50 [03:16<02:10, 6.54s/it]\n 62%|██████▏ | 31/50 [03:22<02:04, 6.54s/it]\n 64%|██████▍ | 32/50 [03:29<01:57, 6.54s/it]\n 66%|██████▌ | 33/50 [03:35<01:51, 6.54s/it]\n 68%|██████▊ | 34/50 [03:42<01:44, 6.54s/it]\n 70%|███████ | 35/50 [03:48<01:38, 6.54s/it]\n 72%|███████▏ | 36/50 [03:55<01:31, 6.54s/it]\n 74%|███████▍ | 37/50 [04:01<01:25, 6.54s/it]\n 76%|███████▌ | 38/50 [04:08<01:18, 6.54s/it]\n 78%|███████▊ | 39/50 [04:14<01:11, 6.54s/it]\n 80%|████████ | 40/50 [04:21<01:05, 6.54s/it]\n 82%|████████▏ | 41/50 [04:28<00:58, 6.54s/it]\n 84%|████████▍ | 42/50 [04:34<00:52, 6.54s/it]\n 86%|████████▌ | 43/50 [04:41<00:45, 6.54s/it]\n 88%|████████▊ | 44/50 [04:47<00:39, 6.54s/it]\n 90%|█████████ | 45/50 [04:54<00:32, 6.54s/it]\n 92%|█████████▏| 46/50 [05:00<00:26, 6.54s/it]\n 94%|█████████▍| 47/50 [05:07<00:19, 6.54s/it]\n 96%|█████████▌| 48/50 [05:13<00:13, 6.54s/it]\n 98%|█████████▊| 49/50 [05:20<00:06, 6.54s/it]\n100%|██████████| 50/50 [05:25<00:00, 6.12s/it]\n100%|██████████| 50/50 [05:25<00:00, 6.51s/it]\n[INFO] Time taken: 326.00207567214966 seconds.",
"metrics": {
"predict_time": 327.390563,
"total_time": 327.423216
},
"output": "https://replicate.delivery/pbxt/f2Jieqy7FPjbW0MM7xjU1SKZ8DUvlve594cxx29ySoe8CqaIB/result.png",
"started_at": "2023-12-28T04:09:12.989060Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/arekedtbs2ou7zjfjvbokqkssm",
"cancel": "https://api.replicate.com/v1/predictions/arekedtbs2ou7zjfjvbokqkssm/cancel"
},
"version": "bddc09369f9e622518f6d11daff26723a513714e08830ed053660d8ac44ffe88"
}
0%| | 0/50 [00:00<?, ?it/s]
2%|▏ | 1/50 [00:06<05:20, 6.54s/it]
4%|▍ | 2/50 [00:13<05:13, 6.53s/it]
6%|▌ | 3/50 [00:19<05:06, 6.53s/it]
8%|▊ | 4/50 [00:26<05:00, 6.53s/it]
10%|█ | 5/50 [00:32<04:53, 6.53s/it]
12%|█▏ | 6/50 [00:39<04:47, 6.53s/it]
14%|█▍ | 7/50 [00:45<04:40, 6.53s/it]
16%|█▌ | 8/50 [00:52<04:34, 6.54s/it]
18%|█▊ | 9/50 [00:58<04:28, 6.54s/it]
20%|██ | 10/50 [01:05<04:21, 6.54s/it]
22%|██▏ | 11/50 [01:11<04:14, 6.54s/it]
24%|██▍ | 12/50 [01:18<04:08, 6.54s/it]
26%|██▌ | 13/50 [01:24<04:01, 6.54s/it]
28%|██▊ | 14/50 [01:31<03:55, 6.54s/it]
30%|███ | 15/50 [01:38<03:48, 6.54s/it]
32%|███▏ | 16/50 [01:44<03:42, 6.54s/it]
34%|███▍ | 17/50 [01:51<03:35, 6.54s/it]
36%|███▌ | 18/50 [01:57<03:29, 6.54s/it]
38%|███▊ | 19/50 [02:04<03:22, 6.54s/it]
40%|████ | 20/50 [02:10<03:16, 6.54s/it]
42%|████▏ | 21/50 [02:17<03:09, 6.54s/it]
44%|████▍ | 22/50 [02:23<03:03, 6.54s/it]
46%|████▌ | 23/50 [02:30<02:56, 6.54s/it]
48%|████▊ | 24/50 [02:36<02:50, 6.54s/it]
50%|█████ | 25/50 [02:43<02:43, 6.54s/it]
52%|█████▏ | 26/50 [02:49<02:36, 6.54s/it]
54%|█████▍ | 27/50 [02:56<02:30, 6.54s/it]
56%|█████▌ | 28/50 [03:03<02:23, 6.54s/it]
58%|█████▊ | 29/50 [03:09<02:17, 6.54s/it]
60%|██████ | 30/50 [03:16<02:10, 6.54s/it]
62%|██████▏ | 31/50 [03:22<02:04, 6.54s/it]
64%|██████▍ | 32/50 [03:29<01:57, 6.54s/it]
66%|██████▌ | 33/50 [03:35<01:51, 6.54s/it]
68%|██████▊ | 34/50 [03:42<01:44, 6.54s/it]
70%|███████ | 35/50 [03:48<01:38, 6.54s/it]
72%|███████▏ | 36/50 [03:55<01:31, 6.54s/it]
74%|███████▍ | 37/50 [04:01<01:25, 6.54s/it]
76%|███████▌ | 38/50 [04:08<01:18, 6.54s/it]
78%|███████▊ | 39/50 [04:14<01:11, 6.54s/it]
80%|████████ | 40/50 [04:21<01:05, 6.54s/it]
82%|████████▏ | 41/50 [04:28<00:58, 6.54s/it]
84%|████████▍ | 42/50 [04:34<00:52, 6.54s/it]
86%|████████▌ | 43/50 [04:41<00:45, 6.54s/it]
88%|████████▊ | 44/50 [04:47<00:39, 6.54s/it]
90%|█████████ | 45/50 [04:54<00:32, 6.54s/it]
92%|█████████▏| 46/50 [05:00<00:26, 6.54s/it]
94%|█████████▍| 47/50 [05:07<00:19, 6.54s/it]
96%|█████████▌| 48/50 [05:13<00:13, 6.54s/it]
98%|█████████▊| 49/50 [05:20<00:06, 6.54s/it]
100%|██████████| 50/50 [05:25<00:00, 6.12s/it]
100%|██████████| 50/50 [05:25<00:00, 6.51s/it]
[INFO] Time taken: 326.00207567214966 seconds.