defaulta photo of an astronaut riding a horse on mars
typetext
{
"guidance_scale": 2.5,
"height": 1024,
"img1": "https://shitao-omnigen.hf.space/gradio_api/file=/tmp/gradio/23e02261d0d5dd416702fc5645b5192af904ddd5d83e6953913720c625b40306/t2i_woman_with_book.png",
"img_guidance_scale": 1.6,
"inference_steps": 50,
"max_input_image_size": 1024,
"offload_model": false,
"prompt": "<img><|image_1|><img> Remove the woman's earrings. Replace the mug with a clear glass filled with sparkling iced cola.",
"separate_cfg_infer": true,
"use_input_image_size_as_output": true,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HSQ**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run vectorspacelab/omnigen using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"vectorspacelab/omnigen:af66691a8952a0ce21b26e840835ad1efe176af159e10169ec5df6916338863b",
{
input: {
guidance_scale: 2.5,
height: 1024,
img1: "https://shitao-omnigen.hf.space/gradio_api/file=/tmp/gradio/23e02261d0d5dd416702fc5645b5192af904ddd5d83e6953913720c625b40306/t2i_woman_with_book.png",
img_guidance_scale: 1.6,
inference_steps: 50,
max_input_image_size: 1024,
offload_model: false,
prompt: "<img><|image_1|><img> Remove the woman's earrings. Replace the mug with a clear glass filled with sparkling iced cola.",
separate_cfg_infer: true,
use_input_image_size_as_output: true,
width: 1024
}
}
);
// 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=r8_HSQ**********************************
This is your API token. Keep it to yourself.
import replicate
Run vectorspacelab/omnigen using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"vectorspacelab/omnigen:af66691a8952a0ce21b26e840835ad1efe176af159e10169ec5df6916338863b",
input={
"guidance_scale": 2.5,
"height": 1024,
"img1": "https://shitao-omnigen.hf.space/gradio_api/file=/tmp/gradio/23e02261d0d5dd416702fc5645b5192af904ddd5d83e6953913720c625b40306/t2i_woman_with_book.png",
"img_guidance_scale": 1.6,
"inference_steps": 50,
"max_input_image_size": 1024,
"offload_model": False,
"prompt": "<img><|image_1|><img> Remove the woman's earrings. Replace the mug with a clear glass filled with sparkling iced cola.",
"separate_cfg_infer": True,
"use_input_image_size_as_output": True,
"width": 1024
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HSQ**********************************
This is your API token. Keep it to yourself.
Run vectorspacelab/omnigen 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": "vectorspacelab/omnigen:af66691a8952a0ce21b26e840835ad1efe176af159e10169ec5df6916338863b",
"input": {
"guidance_scale": 2.5,
"height": 1024,
"img1": "https://shitao-omnigen.hf.space/gradio_api/file=/tmp/gradio/23e02261d0d5dd416702fc5645b5192af904ddd5d83e6953913720c625b40306/t2i_woman_with_book.png",
"img_guidance_scale": 1.6,
"inference_steps": 50,
"max_input_image_size": 1024,
"offload_model": false,
"prompt": "<img><|image_1|><img> Remove the woman\'s earrings. Replace the mug with a clear glass filled with sparkling iced cola.",
"separate_cfg_infer": true,
"use_input_image_size_as_output": true,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "8ahxgzxswnrgg0cjygvat764fc",
"model": "vectorspacelab/omnigen",
"version": "af66691a8952a0ce21b26e840835ad1efe176af159e10169ec5df6916338863b",
"input": {
"guidance_scale": 2.5,
"height": 1024,
"img1": "https://shitao-omnigen.hf.space/gradio_api/file=/tmp/gradio/23e02261d0d5dd416702fc5645b5192af904ddd5d83e6953913720c625b40306/t2i_woman_with_book.png",
"img_guidance_scale": 1.6,
"inference_steps": 50,
"max_input_image_size": 1024,
"offload_model": false,
"prompt": "<img><|image_1|><img> Remove the woman's earrings. Replace the mug with a clear glass filled with sparkling iced cola.",
"separate_cfg_infer": true,
"use_input_image_size_as_output": true,
"width": 1024
},
"logs": "Using seed: 5102\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:05<04:05, 5.01s/it]\n 4%|▍ | 2/50 [00:07<02:47, 3.49s/it]\n 6%|▌ | 3/50 [00:09<02:19, 2.96s/it]\n 8%|▊ | 4/50 [00:12<02:04, 2.71s/it]\n 10%|█ | 5/50 [00:14<01:55, 2.57s/it]\n 12%|█▏ | 6/50 [00:16<01:49, 2.48s/it]\n 14%|█▍ | 7/50 [00:19<01:44, 2.43s/it]\n 16%|█▌ | 8/50 [00:21<01:40, 2.40s/it]\n 18%|█▊ | 9/50 [00:23<01:37, 2.38s/it]\n 20%|██ | 10/50 [00:26<01:34, 2.36s/it]\n 22%|██▏ | 11/50 [00:28<01:31, 2.36s/it]\n 24%|██▍ | 12/50 [00:30<01:29, 2.36s/it]\n 26%|██▌ | 13/50 [00:33<01:27, 2.37s/it]\n 28%|██▊ | 14/50 [00:35<01:25, 2.37s/it]\n 30%|███ | 15/50 [00:37<01:22, 2.36s/it]\n 32%|███▏ | 16/50 [00:40<01:20, 2.36s/it]\n 34%|███▍ | 17/50 [00:42<01:17, 2.35s/it]\n 36%|███▌ | 18/50 [00:44<01:15, 2.35s/it]\n 38%|███▊ | 19/50 [00:47<01:12, 2.34s/it]\n 40%|████ | 20/50 [00:49<01:09, 2.33s/it]\n 42%|████▏ | 21/50 [00:51<01:07, 2.33s/it]\n 44%|████▍ | 22/50 [00:54<01:05, 2.32s/it]\n 46%|████▌ | 23/50 [00:56<01:02, 2.32s/it]\n 48%|████▊ | 24/50 [00:58<01:00, 2.32s/it]\n 50%|█████ | 25/50 [01:01<00:57, 2.32s/it]\n 52%|█████▏ | 26/50 [01:03<00:55, 2.32s/it]\n 54%|█████▍ | 27/50 [01:05<00:53, 2.32s/it]\n 56%|█████▌ | 28/50 [01:08<00:50, 2.32s/it]\n 58%|█████▊ | 29/50 [01:10<00:48, 2.32s/it]\n 60%|██████ | 30/50 [01:12<00:46, 2.32s/it]\n 62%|██████▏ | 31/50 [01:14<00:43, 2.32s/it]\n 64%|██████▍ | 32/50 [01:17<00:41, 2.32s/it]\n 66%|██████▌ | 33/50 [01:19<00:39, 2.32s/it]\n 68%|██████▊ | 34/50 [01:21<00:37, 2.32s/it]\n 70%|███████ | 35/50 [01:24<00:34, 2.32s/it]\n 72%|███████▏ | 36/50 [01:26<00:32, 2.32s/it]\n 74%|███████▍ | 37/50 [01:28<00:30, 2.32s/it]\n 76%|███████▌ | 38/50 [01:31<00:27, 2.32s/it]\n 78%|███████▊ | 39/50 [01:33<00:25, 2.33s/it]\n 80%|████████ | 40/50 [01:35<00:23, 2.34s/it]\n 82%|████████▏ | 41/50 [01:38<00:21, 2.34s/it]\n 84%|████████▍ | 42/50 [01:40<00:18, 2.34s/it]\n 86%|████████▌ | 43/50 [01:42<00:16, 2.34s/it]\n 88%|████████▊ | 44/50 [01:45<00:14, 2.36s/it]\n 90%|█████████ | 45/50 [01:47<00:11, 2.38s/it]\n 92%|█████████▏| 46/50 [01:50<00:09, 2.40s/it]\n 94%|█████████▍| 47/50 [01:52<00:07, 2.42s/it]\n 96%|█████████▌| 48/50 [01:55<00:04, 2.44s/it]\n 98%|█████████▊| 49/50 [01:57<00:02, 2.44s/it]\n100%|██████████| 50/50 [01:59<00:00, 2.42s/it]\n100%|██████████| 50/50 [01:59<00:00, 2.40s/it]",
"output": "https://replicate.delivery/pbxt/Yqaueh60432MPqWU6pUdatZe7mHOvXrjGKek8K6rLIeoKs1OB/out.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-11-03T22:48:00.229Z",
"started_at": "2024-11-03T22:50:21.513944Z",
"completed_at": "2024-11-03T22:52:27.127618Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/8ahxgzxswnrgg0cjygvat764fc/cancel",
"get": "https://api.replicate.com/v1/predictions/8ahxgzxswnrgg0cjygvat764fc",
"web": "https://replicate.com/p/8ahxgzxswnrgg0cjygvat764fc"
},
"metrics": {
"predict_time": 125.613674649,
"total_time": 266.898618
}
}
