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 laion-ai/ongo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"laion-ai/ongo:13e4da486d56b62616baf8d6233ffd2c09ad534af3e8d55cba4356be2be6ad84",
{
input: {
seed: -1,
steps: 100,
width: 256,
height: 256,
prompt: "a farmhouse surrounded by flowers painting",
negative: "",
batch_size: 4,
guidance_scale: 5,
aesthetic_rating: 8,
aesthetic_weight: 0.1,
init_skip_fraction: 0,
intermediate_outputs: false
}
}
);
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 laion-ai/ongo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"laion-ai/ongo:13e4da486d56b62616baf8d6233ffd2c09ad534af3e8d55cba4356be2be6ad84",
input={
"seed": -1,
"steps": 100,
"width": 256,
"height": 256,
"prompt": "a farmhouse surrounded by flowers painting",
"negative": "",
"batch_size": 4,
"guidance_scale": 5,
"aesthetic_rating": 8,
"aesthetic_weight": 0.1,
"init_skip_fraction": 0,
"intermediate_outputs": False
}
)
# The laion-ai/ongo model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/laion-ai/ongo/api#output-schema
print(item)
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 laion-ai/ongo 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": "13e4da486d56b62616baf8d6233ffd2c09ad534af3e8d55cba4356be2be6ad84",
"input": {
"seed": -1,
"steps": 100,
"width": 256,
"height": 256,
"prompt": "a farmhouse surrounded by flowers painting",
"negative": "",
"batch_size": 4,
"guidance_scale": 5,
"aesthetic_rating": 8,
"aesthetic_weight": 0.1,
"init_skip_fraction": 0,
"intermediate_outputs": false
}
}' \
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/laion-ai/ongo@sha256:13e4da486d56b62616baf8d6233ffd2c09ad534af3e8d55cba4356be2be6ad84 \
-i 'seed=-1' \
-i 'steps=100' \
-i 'width=256' \
-i 'height=256' \
-i 'prompt="a farmhouse surrounded by flowers painting"' \
-i 'negative=""' \
-i 'batch_size=4' \
-i 'guidance_scale=5' \
-i 'aesthetic_rating=8' \
-i 'aesthetic_weight=0.1' \
-i 'init_skip_fraction=0' \
-i 'intermediate_outputs=false'
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/laion-ai/ongo@sha256:13e4da486d56b62616baf8d6233ffd2c09ad534af3e8d55cba4356be2be6ad84
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "steps": 100, "width": 256, "height": 256, "prompt": "a farmhouse surrounded by flowers painting", "negative": "", "batch_size": 4, "guidance_scale": 5, "aesthetic_rating": 8, "aesthetic_weight": 0.1, "init_skip_fraction": 0, "intermediate_outputs": false } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-06-28T15:15:11.018622Z",
"created_at": "2022-06-28T15:14:05.514142Z",
"data_removed": false,
"error": null,
"id": "sn5d222eajgo7piqrsp5arjz3y",
"input": {
"seed": -1,
"steps": "100",
"width": 256,
"height": 256,
"prompt": "a farmhouse surrounded by flowers painting",
"batch_size": "4",
"guidance_scale": 5,
"aesthetic_rating": 8,
"aesthetic_weight": 0.1
},
"logs": "Using seed 1629174958\nRunning simulation for a farmhouse surrounded by flowers painting\nEncoding text embeddings with a farmhouse surrounded by flowers painting dimensions\nUsing aesthetic embedding 8 with weight 0.1\nUsing inpaint model but no image is provided. Initializing with zeros.\nRunning diffusion...\n\n 0%| | 0/100 [00:00<?, ?it/s]\n 1%| | 1/100 [00:00<01:33, 1.06it/s]\n 2%|▏ | 2/100 [00:01<01:24, 1.17it/s]\n 3%|▎ | 3/100 [00:02<01:20, 1.20it/s]\n 4%|▍ | 4/100 [00:02<00:56, 1.71it/s]\n 5%|▌ | 5/100 [00:02<00:42, 2.24it/s]\n 6%|▌ | 6/100 [00:03<00:34, 2.76it/s]\n 7%|▋ | 7/100 [00:03<00:28, 3.24it/s]\n 8%|▊ | 8/100 [00:03<00:25, 3.64it/s]\n 9%|▉ | 9/100 [00:03<00:22, 3.98it/s]\n 10%|█ | 10/100 [00:03<00:21, 4.24it/s]\n 11%|█ | 11/100 [00:04<00:20, 4.44it/s]\n 12%|█▏ | 12/100 [00:04<00:19, 4.58it/s]\n 13%|█▎ | 13/100 [00:04<00:18, 4.67it/s]\n 14%|█▍ | 14/100 [00:04<00:18, 4.75it/s]\n 15%|█▌ | 15/100 [00:04<00:17, 4.82it/s]\n 16%|█▌ | 16/100 [00:05<00:17, 4.85it/s]\n 17%|█▋ | 17/100 [00:05<00:17, 4.87it/s]\n 18%|█▊ | 18/100 [00:05<00:16, 4.89it/s]\n 19%|█▉ | 19/100 [00:05<00:16, 4.90it/s]\n 20%|██ | 20/100 [00:05<00:16, 4.93it/s]\n 21%|██ | 21/100 [00:06<00:16, 4.92it/s]\n 22%|██▏ | 22/100 [00:06<00:15, 4.92it/s]\n 23%|██▎ | 23/100 [00:06<00:15, 4.93it/s]\n 24%|██▍ | 24/100 [00:06<00:15, 4.93it/s]\n 25%|██▌ | 25/100 [00:06<00:15, 4.93it/s]\n 26%|██▌ | 26/100 [00:07<00:15, 4.93it/s]\n 27%|██▋ | 27/100 [00:07<00:14, 4.92it/s]\n 28%|██▊ | 28/100 [00:07<00:14, 4.93it/s]\n 29%|██▉ | 29/100 [00:07<00:14, 4.93it/s]\n 30%|███ | 30/100 [00:08<00:14, 4.93it/s]\n 31%|███ | 31/100 [00:08<00:13, 4.93it/s]\n 32%|███▏ | 32/100 [00:08<00:13, 4.93it/s]\n 33%|███▎ | 33/100 [00:08<00:13, 4.93it/s]\n 34%|███▍ | 34/100 [00:08<00:13, 4.93it/s]\n 35%|███▌ | 35/100 [00:09<00:13, 4.93it/s]\n 36%|███▌ | 36/100 [00:09<00:12, 4.94it/s]\n 37%|███▋ | 37/100 [00:09<00:12, 4.94it/s]\n 38%|███▊ | 38/100 [00:09<00:12, 4.93it/s]\n 39%|███▉ | 39/100 [00:09<00:12, 4.94it/s]\n 40%|████ | 40/100 [00:10<00:12, 4.94it/s]\n 41%|████ | 41/100 [00:10<00:11, 4.94it/s]\n 42%|████▏ | 42/100 [00:10<00:11, 4.94it/s]\n 43%|████▎ | 43/100 [00:10<00:11, 4.94it/s]\n 44%|████▍ | 44/100 [00:10<00:11, 4.93it/s]\n 45%|████▌ | 45/100 [00:11<00:11, 4.93it/s]\n 46%|████▌ | 46/100 [00:11<00:10, 4.92it/s]\n 47%|████▋ | 47/100 [00:11<00:10, 4.91it/s]\n 48%|████▊ | 48/100 [00:11<00:10, 4.92it/s]\n 49%|████▉ | 49/100 [00:11<00:10, 4.93it/s]\n 50%|█████ | 50/100 [00:12<00:10, 4.93it/s]\n 51%|█████ | 51/100 [00:12<00:09, 4.93it/s]\n 52%|█████▏ | 52/100 [00:12<00:09, 4.92it/s]\n 53%|█████▎ | 53/100 [00:12<00:09, 4.92it/s]\n 54%|█████▍ | 54/100 [00:12<00:09, 4.94it/s]\n 55%|█████▌ | 55/100 [00:13<00:09, 4.93it/s]\n 56%|█████▌ | 56/100 [00:13<00:08, 4.93it/s]\n 57%|█████▋ | 57/100 [00:13<00:08, 4.92it/s]\n 58%|█████▊ | 58/100 [00:13<00:08, 4.93it/s]\n 59%|█████▉ | 59/100 [00:13<00:08, 4.93it/s]\n 60%|██████ | 60/100 [00:14<00:08, 4.93it/s]\n 61%|██████ | 61/100 [00:14<00:07, 4.92it/s]\n 62%|██████▏ | 62/100 [00:14<00:07, 4.91it/s]\n 63%|██████▎ | 63/100 [00:14<00:07, 4.91it/s]\n 64%|██████▍ | 64/100 [00:14<00:07, 4.90it/s]\n 65%|██████▌ | 65/100 [00:15<00:07, 4.89it/s]\n 66%|██████▌ | 66/100 [00:15<00:06, 4.88it/s]\n 67%|██████▋ | 67/100 [00:15<00:06, 4.88it/s]\n 68%|██████▊ | 68/100 [00:15<00:06, 4.88it/s]\n 69%|██████▉ | 69/100 [00:15<00:06, 4.88it/s]\n 70%|███████ | 70/100 [00:16<00:06, 4.88it/s]\n 71%|███████ | 71/100 [00:16<00:05, 4.89it/s]\n 72%|███████▏ | 72/100 [00:16<00:05, 4.89it/s]\n 73%|███████▎ | 73/100 [00:16<00:05, 4.90it/s]\n 74%|███████▍ | 74/100 [00:16<00:05, 4.89it/s]\n 75%|███████▌ | 75/100 [00:17<00:05, 4.88it/s]\n 76%|███████▌ | 76/100 [00:17<00:04, 4.87it/s]\n 77%|███████▋ | 77/100 [00:17<00:04, 4.86it/s]\n 78%|███████▊ | 78/100 [00:17<00:04, 4.87it/s]\n 79%|███████▉ | 79/100 [00:17<00:04, 4.87it/s]\n 80%|████████ | 80/100 [00:18<00:04, 4.88it/s]\n 81%|████████ | 81/100 [00:18<00:03, 4.89it/s]\n 82%|████████▏ | 82/100 [00:18<00:03, 4.88it/s]\n 83%|████████▎ | 83/100 [00:18<00:03, 4.88it/s]\n 84%|████████▍ | 84/100 [00:19<00:03, 4.87it/s]\n 85%|████████▌ | 85/100 [00:19<00:03, 4.86it/s]\n 86%|████████▌ | 86/100 [00:19<00:02, 4.86it/s]\n 87%|████████▋ | 87/100 [00:19<00:02, 4.86it/s]\n 88%|████████▊ | 88/100 [00:19<00:02, 4.86it/s]\n 89%|████████▉ | 89/100 [00:20<00:02, 4.87it/s]\n 90%|█████████ | 90/100 [00:20<00:02, 4.88it/s]\n 91%|█████████ | 91/100 [00:20<00:01, 4.86it/s]\n 92%|█████████▏| 92/100 [00:20<00:01, 4.86it/s]\n 93%|█████████▎| 93/100 [00:20<00:01, 4.86it/s]\n 94%|█████████▍| 94/100 [00:21<00:01, 4.85it/s]\n 95%|█████████▌| 95/100 [00:21<00:01, 4.86it/s]\n 96%|█████████▌| 96/100 [00:21<00:00, 4.86it/s]\n 97%|█████████▋| 97/100 [00:21<00:00, 4.86it/s]\n 98%|█████████▊| 98/100 [00:21<00:00, 4.86it/s]\nSaving final sample/s\n 99%|█████████▉| 99/100 [00:22<00:00, 4.85it/s]\n100%|██████████| 100/100 [00:22<00:00, 3.24it/s]\n100%|██████████| 100/100 [00:22<00:00, 4.42it/s]",
"metrics": {
"predict_time": 26.032431,
"total_time": 65.50448
},
"output": [
[
"https://replicate.delivery/mgxm/730390c5-9761-44d7-b5d8-eaa7eec9619b/current_0.png",
"https://replicate.delivery/mgxm/5d2239c3-acec-492d-9705-1421358f31f5/current_1.png",
"https://replicate.delivery/mgxm/d0ab32b5-3e34-48f4-bc02-51c13d554fd2/current_2.png",
"https://replicate.delivery/mgxm/02390209-5ec2-4e48-bca8-a3e26ae42e25/current_3.png"
]
],
"started_at": "2022-06-28T15:14:44.986191Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/sn5d222eajgo7piqrsp5arjz3y",
"cancel": "https://api.replicate.com/v1/predictions/sn5d222eajgo7piqrsp5arjz3y/cancel"
},
"version": "13e4da486d56b62616baf8d6233ffd2c09ad534af3e8d55cba4356be2be6ad84"
}
Using seed 1629174958
Running simulation for a farmhouse surrounded by flowers painting
Encoding text embeddings with a farmhouse surrounded by flowers painting dimensions
Using aesthetic embedding 8 with weight 0.1
Using inpaint model but no image is provided. Initializing with zeros.
Running diffusion...
0%| | 0/100 [00:00<?, ?it/s]
1%| | 1/100 [00:00<01:33, 1.06it/s]
2%|▏ | 2/100 [00:01<01:24, 1.17it/s]
3%|▎ | 3/100 [00:02<01:20, 1.20it/s]
4%|▍ | 4/100 [00:02<00:56, 1.71it/s]
5%|▌ | 5/100 [00:02<00:42, 2.24it/s]
6%|▌ | 6/100 [00:03<00:34, 2.76it/s]
7%|▋ | 7/100 [00:03<00:28, 3.24it/s]
8%|▊ | 8/100 [00:03<00:25, 3.64it/s]
9%|▉ | 9/100 [00:03<00:22, 3.98it/s]
10%|█ | 10/100 [00:03<00:21, 4.24it/s]
11%|█ | 11/100 [00:04<00:20, 4.44it/s]
12%|█▏ | 12/100 [00:04<00:19, 4.58it/s]
13%|█▎ | 13/100 [00:04<00:18, 4.67it/s]
14%|█▍ | 14/100 [00:04<00:18, 4.75it/s]
15%|█▌ | 15/100 [00:04<00:17, 4.82it/s]
16%|█▌ | 16/100 [00:05<00:17, 4.85it/s]
17%|█▋ | 17/100 [00:05<00:17, 4.87it/s]
18%|█▊ | 18/100 [00:05<00:16, 4.89it/s]
19%|█▉ | 19/100 [00:05<00:16, 4.90it/s]
20%|██ | 20/100 [00:05<00:16, 4.93it/s]
21%|██ | 21/100 [00:06<00:16, 4.92it/s]
22%|██▏ | 22/100 [00:06<00:15, 4.92it/s]
23%|██▎ | 23/100 [00:06<00:15, 4.93it/s]
24%|██▍ | 24/100 [00:06<00:15, 4.93it/s]
25%|██▌ | 25/100 [00:06<00:15, 4.93it/s]
26%|██▌ | 26/100 [00:07<00:15, 4.93it/s]
27%|██▋ | 27/100 [00:07<00:14, 4.92it/s]
28%|██▊ | 28/100 [00:07<00:14, 4.93it/s]
29%|██▉ | 29/100 [00:07<00:14, 4.93it/s]
30%|███ | 30/100 [00:08<00:14, 4.93it/s]
31%|███ | 31/100 [00:08<00:13, 4.93it/s]
32%|███▏ | 32/100 [00:08<00:13, 4.93it/s]
33%|███▎ | 33/100 [00:08<00:13, 4.93it/s]
34%|███▍ | 34/100 [00:08<00:13, 4.93it/s]
35%|███▌ | 35/100 [00:09<00:13, 4.93it/s]
36%|███▌ | 36/100 [00:09<00:12, 4.94it/s]
37%|███▋ | 37/100 [00:09<00:12, 4.94it/s]
38%|███▊ | 38/100 [00:09<00:12, 4.93it/s]
39%|███▉ | 39/100 [00:09<00:12, 4.94it/s]
40%|████ | 40/100 [00:10<00:12, 4.94it/s]
41%|████ | 41/100 [00:10<00:11, 4.94it/s]
42%|████▏ | 42/100 [00:10<00:11, 4.94it/s]
43%|████▎ | 43/100 [00:10<00:11, 4.94it/s]
44%|████▍ | 44/100 [00:10<00:11, 4.93it/s]
45%|████▌ | 45/100 [00:11<00:11, 4.93it/s]
46%|████▌ | 46/100 [00:11<00:10, 4.92it/s]
47%|████▋ | 47/100 [00:11<00:10, 4.91it/s]
48%|████▊ | 48/100 [00:11<00:10, 4.92it/s]
49%|████▉ | 49/100 [00:11<00:10, 4.93it/s]
50%|█████ | 50/100 [00:12<00:10, 4.93it/s]
51%|█████ | 51/100 [00:12<00:09, 4.93it/s]
52%|█████▏ | 52/100 [00:12<00:09, 4.92it/s]
53%|█████▎ | 53/100 [00:12<00:09, 4.92it/s]
54%|█████▍ | 54/100 [00:12<00:09, 4.94it/s]
55%|█████▌ | 55/100 [00:13<00:09, 4.93it/s]
56%|█████▌ | 56/100 [00:13<00:08, 4.93it/s]
57%|█████▋ | 57/100 [00:13<00:08, 4.92it/s]
58%|█████▊ | 58/100 [00:13<00:08, 4.93it/s]
59%|█████▉ | 59/100 [00:13<00:08, 4.93it/s]
60%|██████ | 60/100 [00:14<00:08, 4.93it/s]
61%|██████ | 61/100 [00:14<00:07, 4.92it/s]
62%|██████▏ | 62/100 [00:14<00:07, 4.91it/s]
63%|██████▎ | 63/100 [00:14<00:07, 4.91it/s]
64%|██████▍ | 64/100 [00:14<00:07, 4.90it/s]
65%|██████▌ | 65/100 [00:15<00:07, 4.89it/s]
66%|██████▌ | 66/100 [00:15<00:06, 4.88it/s]
67%|██████▋ | 67/100 [00:15<00:06, 4.88it/s]
68%|██████▊ | 68/100 [00:15<00:06, 4.88it/s]
69%|██████▉ | 69/100 [00:15<00:06, 4.88it/s]
70%|███████ | 70/100 [00:16<00:06, 4.88it/s]
71%|███████ | 71/100 [00:16<00:05, 4.89it/s]
72%|███████▏ | 72/100 [00:16<00:05, 4.89it/s]
73%|███████▎ | 73/100 [00:16<00:05, 4.90it/s]
74%|███████▍ | 74/100 [00:16<00:05, 4.89it/s]
75%|███████▌ | 75/100 [00:17<00:05, 4.88it/s]
76%|███████▌ | 76/100 [00:17<00:04, 4.87it/s]
77%|███████▋ | 77/100 [00:17<00:04, 4.86it/s]
78%|███████▊ | 78/100 [00:17<00:04, 4.87it/s]
79%|███████▉ | 79/100 [00:17<00:04, 4.87it/s]
80%|████████ | 80/100 [00:18<00:04, 4.88it/s]
81%|████████ | 81/100 [00:18<00:03, 4.89it/s]
82%|████████▏ | 82/100 [00:18<00:03, 4.88it/s]
83%|████████▎ | 83/100 [00:18<00:03, 4.88it/s]
84%|████████▍ | 84/100 [00:19<00:03, 4.87it/s]
85%|████████▌ | 85/100 [00:19<00:03, 4.86it/s]
86%|████████▌ | 86/100 [00:19<00:02, 4.86it/s]
87%|████████▋ | 87/100 [00:19<00:02, 4.86it/s]
88%|████████▊ | 88/100 [00:19<00:02, 4.86it/s]
89%|████████▉ | 89/100 [00:20<00:02, 4.87it/s]
90%|█████████ | 90/100 [00:20<00:02, 4.88it/s]
91%|█████████ | 91/100 [00:20<00:01, 4.86it/s]
92%|█████████▏| 92/100 [00:20<00:01, 4.86it/s]
93%|█████████▎| 93/100 [00:20<00:01, 4.86it/s]
94%|█████████▍| 94/100 [00:21<00:01, 4.85it/s]
95%|█████████▌| 95/100 [00:21<00:01, 4.86it/s]
96%|█████████▌| 96/100 [00:21<00:00, 4.86it/s]
97%|█████████▋| 97/100 [00:21<00:00, 4.86it/s]
98%|█████████▊| 98/100 [00:21<00:00, 4.86it/s]
Saving final sample/s
99%|█████████▉| 99/100 [00:22<00:00, 4.85it/s]
100%|██████████| 100/100 [00:22<00:00, 3.24it/s]
100%|██████████| 100/100 [00:22<00:00, 4.42it/s]