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.
chenxwh /onediffusion:de9c4daa
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport 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 chenxwh/onediffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"chenxwh/onediffusion:de9c4daae9e4792c9525e3fe6e605090bdaba107b0336eb873cc97336ec1a126",
{
input: {
task: "multiview",
width: 1024,
height: 1024,
image1: "https://replicate.delivery/pbxt/MEdVTm6cjWH1LxPCFbJjkvWUAhvRp8VNLPWgXFdIgb44jYW2/cat_on_table.webp",
prompt: "A cat with orange and white fur sits on a round wooden table. The cat has striking green eyes and a pink nose. Its ears are perked up, and its tail is curled around its body. The background is blurred, showing a white wall, a wooden chair, and a wooden table with a white pot and green plant. A white curtain is visible on the right side. The cat's gaze is directed slightly to the right, and its paws are white. The overall scene creates a cozy, domestic atmosphere with the cat as the central focus.",
azimuth: "0,20,40,60",
distance: "1.5,1.5,1.5,1.5",
elevation: "0,0,0,0",
denoise_mask: "0, 0, 1, 0, 1, 0, 1, 0",
focal_length: 1.3887,
guidance_scale: 4,
negative_prompt: "monochrome, greyscale, low-res, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
num_inference_steps: 50,
use_input_image_size: 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 variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run chenxwh/onediffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"chenxwh/onediffusion:de9c4daae9e4792c9525e3fe6e605090bdaba107b0336eb873cc97336ec1a126",
input={
"task": "multiview",
"width": 1024,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/MEdVTm6cjWH1LxPCFbJjkvWUAhvRp8VNLPWgXFdIgb44jYW2/cat_on_table.webp",
"prompt": "A cat with orange and white fur sits on a round wooden table. The cat has striking green eyes and a pink nose. Its ears are perked up, and its tail is curled around its body. The background is blurred, showing a white wall, a wooden chair, and a wooden table with a white pot and green plant. A white curtain is visible on the right side. The cat's gaze is directed slightly to the right, and its paws are white. The overall scene creates a cozy, domestic atmosphere with the cat as the central focus.",
"azimuth": "0,20,40,60",
"distance": "1.5,1.5,1.5,1.5",
"elevation": "0,0,0,0",
"denoise_mask": "0, 0, 1, 0, 1, 0, 1, 0",
"focal_length": 1.3887,
"guidance_scale": 4,
"negative_prompt": "monochrome, greyscale, low-res, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
"num_inference_steps": 50,
"use_input_image_size": False
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/onediffusion 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": "de9c4daae9e4792c9525e3fe6e605090bdaba107b0336eb873cc97336ec1a126",
"input": {
"task": "multiview",
"width": 1024,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/MEdVTm6cjWH1LxPCFbJjkvWUAhvRp8VNLPWgXFdIgb44jYW2/cat_on_table.webp",
"prompt": "A cat with orange and white fur sits on a round wooden table. The cat has striking green eyes and a pink nose. Its ears are perked up, and its tail is curled around its body. The background is blurred, showing a white wall, a wooden chair, and a wooden table with a white pot and green plant. A white curtain is visible on the right side. The cat\'s gaze is directed slightly to the right, and its paws are white. The overall scene creates a cozy, domestic atmosphere with the cat as the central focus.",
"azimuth": "0,20,40,60",
"distance": "1.5,1.5,1.5,1.5",
"elevation": "0,0,0,0",
"denoise_mask": "0, 0, 1, 0, 1, 0, 1, 0",
"focal_length": 1.3887,
"guidance_scale": 4,
"negative_prompt": "monochrome, greyscale, low-res, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
"num_inference_steps": 50,
"use_input_image_size": false
}
}' \
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-12-30T16:06:22.679306Z",
"created_at": "2024-12-30T16:00:04.321000Z",
"data_removed": false,
"error": null,
"id": "9hwjebdww5rma0cm315v59az70",
"input": {
"task": "multiview",
"width": 1024,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/MEdVTm6cjWH1LxPCFbJjkvWUAhvRp8VNLPWgXFdIgb44jYW2/cat_on_table.webp",
"prompt": "A cat with orange and white fur sits on a round wooden table. The cat has striking green eyes and a pink nose. Its ears are perked up, and its tail is curled around its body. The background is blurred, showing a white wall, a wooden chair, and a wooden table with a white pot and green plant. A white curtain is visible on the right side. The cat's gaze is directed slightly to the right, and its paws are white. The overall scene creates a cozy, domestic atmosphere with the cat as the central focus.",
"azimuth": "0,20,40,60",
"distance": "1.5,1.5,1.5,1.5",
"elevation": "0,0,0,0",
"denoise_mask": "0, 0, 1, 0, 1, 0, 1, 0",
"focal_length": 1.3887,
"guidance_scale": 4,
"negative_prompt": "monochrome, greyscale, low-res, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
"num_inference_steps": 50,
"use_input_image_size": false
},
"logs": "Using width, height: 1024, 1024\nUsing seed: 50778\nUsing prompt: [[multiview]] A cat with orange and white fur sits on a round wooden table. The cat has striking green eyes and a pink nose. Its ears are perked up, and its tail is curled around its body. The background is blurred, showing a white wall, a wooden chair, and a wooden table with a white pot and green plant. A white curtain is visible on the right side. The cat's gaze is directed slightly to the right, and its paws are white. The overall scene creates a cozy, domestic atmosphere with the cat as the central focus.\n/src/onediffusion/diffusion/pipelines/image_processor.py:572: FutureWarning: Passing `image` as torch tensor with value range in [-1,1] is deprecated. The expected value range for image tensor is [0,1] when passing as pytorch tensor or numpy Array. You passed `image` with value range [-1.0,1.0]\nwarnings.warn(\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:06<05:12, 6.38s/it]\n 4%|▍ | 2/50 [00:12<05:05, 6.37s/it]\n 6%|▌ | 3/50 [00:19<05:00, 6.38s/it]\n 8%|▊ | 4/50 [00:25<04:54, 6.41s/it]\n 10%|█ | 5/50 [00:32<04:49, 6.43s/it]\n 12%|█▏ | 6/50 [00:38<04:43, 6.44s/it]\n 14%|█▍ | 7/50 [00:44<04:37, 6.45s/it]\n 16%|█▌ | 8/50 [00:51<04:31, 6.47s/it]\n 18%|█▊ | 9/50 [00:58<04:25, 6.49s/it]\n 20%|██ | 10/50 [01:04<04:19, 6.49s/it]\n 22%|██▏ | 11/50 [01:11<04:13, 6.49s/it]\n 24%|██▍ | 12/50 [01:17<04:06, 6.50s/it]\n 26%|██▌ | 13/50 [01:24<04:00, 6.50s/it]\n 28%|██▊ | 14/50 [01:30<03:54, 6.51s/it]\n 30%|███ | 15/50 [01:37<03:48, 6.52s/it]\n 32%|███▏ | 16/50 [01:43<03:41, 6.53s/it]\n 34%|███▍ | 17/50 [01:50<03:35, 6.53s/it]\n 36%|███▌ | 18/50 [01:56<03:29, 6.54s/it]\n 38%|███▊ | 19/50 [02:03<03:22, 6.55s/it]\n 40%|████ | 20/50 [02:09<03:16, 6.55s/it]\n 42%|████▏ | 21/50 [02:16<03:09, 6.55s/it]\n 44%|████▍ | 22/50 [02:22<03:03, 6.55s/it]\n 46%|████▌ | 23/50 [02:29<02:57, 6.56s/it]\n 48%|████▊ | 24/50 [02:36<02:50, 6.56s/it]\n 50%|█████ | 25/50 [02:42<02:43, 6.55s/it]\n 52%|█████▏ | 26/50 [02:49<02:37, 6.55s/it]\n 54%|█████▍ | 27/50 [02:55<02:30, 6.55s/it]\n 56%|█████▌ | 28/50 [03:02<02:24, 6.55s/it]\n 58%|█████▊ | 29/50 [03:08<02:17, 6.56s/it]\n 60%|██████ | 30/50 [03:15<02:11, 6.56s/it]\n 62%|██████▏ | 31/50 [03:22<02:04, 6.57s/it]\n 64%|██████▍ | 32/50 [03:28<01:58, 6.57s/it]\n 66%|██████▌ | 33/50 [03:35<01:51, 6.57s/it]\n 68%|██████▊ | 34/50 [03:41<01:45, 6.57s/it]\n 70%|███████ | 35/50 [03:48<01:38, 6.57s/it]\n 72%|███████▏ | 36/50 [03:54<01:31, 6.57s/it]\n 74%|███████▍ | 37/50 [04:01<01:25, 6.57s/it]\n 76%|███████▌ | 38/50 [04:08<01:18, 6.57s/it]\n 78%|███████▊ | 39/50 [04:14<01:12, 6.57s/it]\n 80%|████████ | 40/50 [04:21<01:05, 6.58s/it]\n 82%|████████▏ | 41/50 [04:27<00:59, 6.57s/it]\n 84%|████████▍ | 42/50 [04:34<00:52, 6.57s/it]\n 86%|████████▌ | 43/50 [04:40<00:46, 6.58s/it]\n 88%|████████▊ | 44/50 [04:47<00:39, 6.58s/it]\n 90%|█████████ | 45/50 [04:54<00:32, 6.58s/it]\n 92%|█████████▏| 46/50 [05:00<00:26, 6.58s/it]\n 94%|█████████▍| 47/50 [05:07<00:19, 6.58s/it]\n 96%|█████████▌| 48/50 [05:13<00:13, 6.58s/it]\n 98%|█████████▊| 49/50 [05:20<00:06, 6.58s/it]\n100%|██████████| 50/50 [05:27<00:00, 6.59s/it]\n100%|██████████| 50/50 [05:27<00:00, 6.54s/it]",
"metrics": {
"predict_time": 329.084405959,
"total_time": 378.358306
},
"output": [
"https://replicate.delivery/xezq/gFVa0GN8OS4dARVkHf3uTBjmUjVA9Ybb33xLGylyfe183OAoA/out_0.png",
"https://replicate.delivery/xezq/fEqyrSJefuP5NI35m2yWING2ai2NIbqVDfbl7lfZoufjftDAKA/out_1.png"
],
"started_at": "2024-12-30T16:00:53.594900Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-gekbwiobnchom7yhg2hxihqwvzynpz6epv2wbeb5atbrqljwtluq",
"get": "https://api.replicate.com/v1/predictions/9hwjebdww5rma0cm315v59az70",
"cancel": "https://api.replicate.com/v1/predictions/9hwjebdww5rma0cm315v59az70/cancel"
},
"version": "de9c4daae9e4792c9525e3fe6e605090bdaba107b0336eb873cc97336ec1a126"
}
Using width, height: 1024, 1024
Using seed: 50778
Using prompt: [[multiview]] A cat with orange and white fur sits on a round wooden table. The cat has striking green eyes and a pink nose. Its ears are perked up, and its tail is curled around its body. The background is blurred, showing a white wall, a wooden chair, and a wooden table with a white pot and green plant. A white curtain is visible on the right side. The cat's gaze is directed slightly to the right, and its paws are white. The overall scene creates a cozy, domestic atmosphere with the cat as the central focus.
/src/onediffusion/diffusion/pipelines/image_processor.py:572: FutureWarning: Passing `image` as torch tensor with value range in [-1,1] is deprecated. The expected value range for image tensor is [0,1] when passing as pytorch tensor or numpy Array. You passed `image` with value range [-1.0,1.0]
warnings.warn(
0%| | 0/50 [00:00<?, ?it/s]
2%|▏ | 1/50 [00:06<05:12, 6.38s/it]
4%|▍ | 2/50 [00:12<05:05, 6.37s/it]
6%|▌ | 3/50 [00:19<05:00, 6.38s/it]
8%|▊ | 4/50 [00:25<04:54, 6.41s/it]
10%|█ | 5/50 [00:32<04:49, 6.43s/it]
12%|█▏ | 6/50 [00:38<04:43, 6.44s/it]
14%|█▍ | 7/50 [00:44<04:37, 6.45s/it]
16%|█▌ | 8/50 [00:51<04:31, 6.47s/it]
18%|█▊ | 9/50 [00:58<04:25, 6.49s/it]
20%|██ | 10/50 [01:04<04:19, 6.49s/it]
22%|██▏ | 11/50 [01:11<04:13, 6.49s/it]
24%|██▍ | 12/50 [01:17<04:06, 6.50s/it]
26%|██▌ | 13/50 [01:24<04:00, 6.50s/it]
28%|██▊ | 14/50 [01:30<03:54, 6.51s/it]
30%|███ | 15/50 [01:37<03:48, 6.52s/it]
32%|███▏ | 16/50 [01:43<03:41, 6.53s/it]
34%|███▍ | 17/50 [01:50<03:35, 6.53s/it]
36%|███▌ | 18/50 [01:56<03:29, 6.54s/it]
38%|███▊ | 19/50 [02:03<03:22, 6.55s/it]
40%|████ | 20/50 [02:09<03:16, 6.55s/it]
42%|████▏ | 21/50 [02:16<03:09, 6.55s/it]
44%|████▍ | 22/50 [02:22<03:03, 6.55s/it]
46%|████▌ | 23/50 [02:29<02:57, 6.56s/it]
48%|████▊ | 24/50 [02:36<02:50, 6.56s/it]
50%|█████ | 25/50 [02:42<02:43, 6.55s/it]
52%|█████▏ | 26/50 [02:49<02:37, 6.55s/it]
54%|█████▍ | 27/50 [02:55<02:30, 6.55s/it]
56%|█████▌ | 28/50 [03:02<02:24, 6.55s/it]
58%|█████▊ | 29/50 [03:08<02:17, 6.56s/it]
60%|██████ | 30/50 [03:15<02:11, 6.56s/it]
62%|██████▏ | 31/50 [03:22<02:04, 6.57s/it]
64%|██████▍ | 32/50 [03:28<01:58, 6.57s/it]
66%|██████▌ | 33/50 [03:35<01:51, 6.57s/it]
68%|██████▊ | 34/50 [03:41<01:45, 6.57s/it]
70%|███████ | 35/50 [03:48<01:38, 6.57s/it]
72%|███████▏ | 36/50 [03:54<01:31, 6.57s/it]
74%|███████▍ | 37/50 [04:01<01:25, 6.57s/it]
76%|███████▌ | 38/50 [04:08<01:18, 6.57s/it]
78%|███████▊ | 39/50 [04:14<01:12, 6.57s/it]
80%|████████ | 40/50 [04:21<01:05, 6.58s/it]
82%|████████▏ | 41/50 [04:27<00:59, 6.57s/it]
84%|████████▍ | 42/50 [04:34<00:52, 6.57s/it]
86%|████████▌ | 43/50 [04:40<00:46, 6.58s/it]
88%|████████▊ | 44/50 [04:47<00:39, 6.58s/it]
90%|█████████ | 45/50 [04:54<00:32, 6.58s/it]
92%|█████████▏| 46/50 [05:00<00:26, 6.58s/it]
94%|█████████▍| 47/50 [05:07<00:19, 6.58s/it]
96%|█████████▌| 48/50 [05:13<00:13, 6.58s/it]
98%|█████████▊| 49/50 [05:20<00:06, 6.58s/it]
100%|██████████| 50/50 [05:27<00:00, 6.59s/it]
100%|██████████| 50/50 [05:27<00:00, 6.54s/it]