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: "faceid",
width: 1024,
height: 1024,
image1: "https://replicate.delivery/pbxt/MEclgWn7tJPKoj7V2DsxtauylisSbg1AzzlFmCK9pZWaIex8/image.webp",
image2: "https://replicate.delivery/pbxt/MEclg9MolH2OG1dwo2C5zPhxnnGYQ4VFAysKHAyr5ORlgMNA/image%20%281%29.webp",
image3: "https://replicate.delivery/pbxt/MEclgBOrWcbUp6wWiGisxSdULWNxnWXY1KjrDBiYB019wyvu/image%20%282%29.webp",
prompt: "[[img0]] detailed face, A woman with dark hair styled in an intricate updo, wearing a traditional orange and black outfit with elaborate gold embroidery. She has an elegant, poised expression, standing against a serene outdoor setting with classical architecture [[img1]] A young Asian woman with long dark hair and brown eyes smiles at the camera. She wears a red tank top with white flowers and green leaves. The background is blurred, with white and blue tones visible. The image has a slightly grainy quality. [[img2]] A young Asian woman in traditional attire stands against a brown background. She wears a white dress adorned with purple and green floral patterns. Her hair is styled in a bun, and she holds a small white lace umbrella with a gold handle. The image captures her elegant appearance and cultural dress. [[img3]] A woman in traditional Asian attire stands in front of a blurred building. She wears a green robe with floral designs and a black hat with lace. A man in a red robe and black hat stands behind her. The scene appears to be set in an Asian country.",
azimuth: "0",
distance: "1.5",
elevation: "0",
denoise_mask: "1, 0, 0, 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: true
}
}
);
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": "faceid",
"width": 1024,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/MEclgWn7tJPKoj7V2DsxtauylisSbg1AzzlFmCK9pZWaIex8/image.webp",
"image2": "https://replicate.delivery/pbxt/MEclg9MolH2OG1dwo2C5zPhxnnGYQ4VFAysKHAyr5ORlgMNA/image%20%281%29.webp",
"image3": "https://replicate.delivery/pbxt/MEclgBOrWcbUp6wWiGisxSdULWNxnWXY1KjrDBiYB019wyvu/image%20%282%29.webp",
"prompt": "[[img0]] detailed face, A woman with dark hair styled in an intricate updo, wearing a traditional orange and black outfit with elaborate gold embroidery. She has an elegant, poised expression, standing against a serene outdoor setting with classical architecture [[img1]] A young Asian woman with long dark hair and brown eyes smiles at the camera. She wears a red tank top with white flowers and green leaves. The background is blurred, with white and blue tones visible. The image has a slightly grainy quality. [[img2]] A young Asian woman in traditional attire stands against a brown background. She wears a white dress adorned with purple and green floral patterns. Her hair is styled in a bun, and she holds a small white lace umbrella with a gold handle. The image captures her elegant appearance and cultural dress. [[img3]] A woman in traditional Asian attire stands in front of a blurred building. She wears a green robe with floral designs and a black hat with lace. A man in a red robe and black hat stands behind her. The scene appears to be set in an Asian country.",
"azimuth": "0",
"distance": "1.5",
"elevation": "0",
"denoise_mask": "1, 0, 0, 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": True
}
)
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": "faceid",
"width": 1024,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/MEclgWn7tJPKoj7V2DsxtauylisSbg1AzzlFmCK9pZWaIex8/image.webp",
"image2": "https://replicate.delivery/pbxt/MEclg9MolH2OG1dwo2C5zPhxnnGYQ4VFAysKHAyr5ORlgMNA/image%20%281%29.webp",
"image3": "https://replicate.delivery/pbxt/MEclgBOrWcbUp6wWiGisxSdULWNxnWXY1KjrDBiYB019wyvu/image%20%282%29.webp",
"prompt": "[[img0]] detailed face, A woman with dark hair styled in an intricate updo, wearing a traditional orange and black outfit with elaborate gold embroidery. She has an elegant, poised expression, standing against a serene outdoor setting with classical architecture [[img1]] A young Asian woman with long dark hair and brown eyes smiles at the camera. She wears a red tank top with white flowers and green leaves. The background is blurred, with white and blue tones visible. The image has a slightly grainy quality. [[img2]] A young Asian woman in traditional attire stands against a brown background. She wears a white dress adorned with purple and green floral patterns. Her hair is styled in a bun, and she holds a small white lace umbrella with a gold handle. The image captures her elegant appearance and cultural dress. [[img3]] A woman in traditional Asian attire stands in front of a blurred building. She wears a green robe with floral designs and a black hat with lace. A man in a red robe and black hat stands behind her. The scene appears to be set in an Asian country.",
"azimuth": "0",
"distance": "1.5",
"elevation": "0",
"denoise_mask": "1, 0, 0, 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": true
}
}' \
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-30T15:13:09.089394Z",
"created_at": "2024-12-30T15:11:44.266000Z",
"data_removed": false,
"error": null,
"id": "3v06z2bwh9rmc0cm30frah2jyc",
"input": {
"task": "faceid",
"width": 1024,
"height": 1024,
"image1": "https://replicate.delivery/pbxt/MEclgWn7tJPKoj7V2DsxtauylisSbg1AzzlFmCK9pZWaIex8/image.webp",
"image2": "https://replicate.delivery/pbxt/MEclg9MolH2OG1dwo2C5zPhxnnGYQ4VFAysKHAyr5ORlgMNA/image%20%281%29.webp",
"image3": "https://replicate.delivery/pbxt/MEclgBOrWcbUp6wWiGisxSdULWNxnWXY1KjrDBiYB019wyvu/image%20%282%29.webp",
"prompt": "[[img0]] detailed face, A woman with dark hair styled in an intricate updo, wearing a traditional orange and black outfit with elaborate gold embroidery. She has an elegant, poised expression, standing against a serene outdoor setting with classical architecture [[img1]] A young Asian woman with long dark hair and brown eyes smiles at the camera. She wears a red tank top with white flowers and green leaves. The background is blurred, with white and blue tones visible. The image has a slightly grainy quality. [[img2]] A young Asian woman in traditional attire stands against a brown background. She wears a white dress adorned with purple and green floral patterns. Her hair is styled in a bun, and she holds a small white lace umbrella with a gold handle. The image captures her elegant appearance and cultural dress. [[img3]] A woman in traditional Asian attire stands in front of a blurred building. She wears a green robe with floral designs and a black hat with lace. A man in a red robe and black hat stands behind her. The scene appears to be set in an Asian country.",
"azimuth": "0",
"distance": "1.5",
"elevation": "0",
"denoise_mask": "1, 0, 0, 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": true
},
"logs": "Using width, height: 608, 896\nUsing seed: 61442\nUsing prompt: [[faceid]] [[img0]] detailed face, A woman with dark hair styled in an intricate updo, wearing a traditional orange and black outfit with elaborate gold embroidery. She has an elegant, poised expression, standing against a serene outdoor setting with classical architecture [[img1]] A young Asian woman with long dark hair and brown eyes smiles at the camera. She wears a red tank top with white flowers and green leaves. The background is blurred, with white and blue tones visible. The image has a slightly grainy quality. [[img2]] A young Asian woman in traditional attire stands against a brown background. She wears a white dress adorned with purple and green floral patterns. Her hair is styled in a bun, and she holds a small white lace umbrella with a gold handle. The image captures her elegant appearance and cultural dress. [[img3]] A woman in traditional Asian attire stands in front of a blurred building. She wears a green robe with floral designs and a black hat with lace. A man in a red robe and black hat stands behind her. The scene appears to be set in an Asian country.\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:01<00:56, 1.16s/it]\n 4%|▍ | 2/50 [00:02<00:54, 1.13s/it]\n 6%|▌ | 3/50 [00:03<00:53, 1.15s/it]\n 8%|▊ | 4/50 [00:04<00:53, 1.15s/it]\n 10%|█ | 5/50 [00:05<00:52, 1.16s/it]\n 12%|█▏ | 6/50 [00:06<00:50, 1.16s/it]\n 14%|█▍ | 7/50 [00:08<00:49, 1.16s/it]\n 16%|█▌ | 8/50 [00:09<00:48, 1.16s/it]\n 18%|█▊ | 9/50 [00:10<00:47, 1.16s/it]\n 20%|██ | 10/50 [00:11<00:46, 1.16s/it]\n 22%|██▏ | 11/50 [00:12<00:45, 1.16s/it]\n 24%|██▍ | 12/50 [00:13<00:44, 1.16s/it]\n 26%|██▌ | 13/50 [00:15<00:42, 1.16s/it]\n 28%|██▊ | 14/50 [00:16<00:41, 1.16s/it]\n 30%|███ | 15/50 [00:17<00:40, 1.16s/it]\n 32%|███▏ | 16/50 [00:18<00:39, 1.16s/it]\n 34%|███▍ | 17/50 [00:19<00:38, 1.16s/it]\n 36%|███▌ | 18/50 [00:20<00:37, 1.16s/it]\n 38%|███▊ | 19/50 [00:22<00:36, 1.16s/it]\n 40%|████ | 20/50 [00:23<00:34, 1.16s/it]\n 42%|████▏ | 21/50 [00:24<00:33, 1.16s/it]\n 44%|████▍ | 22/50 [00:25<00:32, 1.16s/it]\n 46%|████▌ | 23/50 [00:26<00:31, 1.16s/it]\n 48%|████▊ | 24/50 [00:27<00:30, 1.16s/it]\n 50%|█████ | 25/50 [00:28<00:29, 1.16s/it]\n 52%|█████▏ | 26/50 [00:30<00:27, 1.16s/it]\n 54%|█████▍ | 27/50 [00:31<00:26, 1.16s/it]\n 56%|█████▌ | 28/50 [00:32<00:25, 1.16s/it]\n 58%|█████▊ | 29/50 [00:33<00:24, 1.16s/it]\n 60%|██████ | 30/50 [00:34<00:23, 1.16s/it]\n 62%|██████▏ | 31/50 [00:35<00:22, 1.16s/it]\n 64%|██████▍ | 32/50 [00:37<00:20, 1.16s/it]\n 66%|██████▌ | 33/50 [00:38<00:19, 1.16s/it]\n 68%|██████▊ | 34/50 [00:39<00:18, 1.16s/it]\n 70%|███████ | 35/50 [00:40<00:17, 1.16s/it]\n 72%|███████▏ | 36/50 [00:41<00:16, 1.16s/it]\n 74%|███████▍ | 37/50 [00:42<00:15, 1.16s/it]\n 76%|███████▌ | 38/50 [00:44<00:14, 1.17s/it]\n 78%|███████▊ | 39/50 [00:45<00:12, 1.17s/it]\n 80%|████████ | 40/50 [00:46<00:11, 1.16s/it]\n 82%|████████▏ | 41/50 [00:47<00:10, 1.16s/it]\n 84%|████████▍ | 42/50 [00:48<00:09, 1.16s/it]\n 86%|████████▌ | 43/50 [00:49<00:08, 1.16s/it]\n 88%|████████▊ | 44/50 [00:51<00:06, 1.16s/it]\n 90%|█████████ | 45/50 [00:52<00:05, 1.16s/it]\n 92%|█████████▏| 46/50 [00:53<00:04, 1.16s/it]\n 94%|█████████▍| 47/50 [00:54<00:03, 1.16s/it]\n 96%|█████████▌| 48/50 [00:55<00:02, 1.16s/it]\n 98%|█████████▊| 49/50 [00:56<00:01, 1.16s/it]\n100%|██████████| 50/50 [00:58<00:00, 1.16s/it]\n100%|██████████| 50/50 [00:58<00:00, 1.16s/it]",
"metrics": {
"predict_time": 59.047270655,
"total_time": 84.823394
},
"output": [
"https://replicate.delivery/xezq/RnEEZt22kRpfHCXZf8e2RpBkUbx6fkyNnjYTD8ot8JpVoaAQB/out_0.png"
],
"started_at": "2024-12-30T15:12:10.042123Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-scieb5ewxh3baaedwq6pean257b3d5owoauo3ffrrzujytecpnpq",
"get": "https://api.replicate.com/v1/predictions/3v06z2bwh9rmc0cm30frah2jyc",
"cancel": "https://api.replicate.com/v1/predictions/3v06z2bwh9rmc0cm30frah2jyc/cancel"
},
"version": "de9c4daae9e4792c9525e3fe6e605090bdaba107b0336eb873cc97336ec1a126"
}
Using width, height: 608, 896
Using seed: 61442
Using prompt: [[faceid]] [[img0]] detailed face, A woman with dark hair styled in an intricate updo, wearing a traditional orange and black outfit with elaborate gold embroidery. She has an elegant, poised expression, standing against a serene outdoor setting with classical architecture [[img1]] A young Asian woman with long dark hair and brown eyes smiles at the camera. She wears a red tank top with white flowers and green leaves. The background is blurred, with white and blue tones visible. The image has a slightly grainy quality. [[img2]] A young Asian woman in traditional attire stands against a brown background. She wears a white dress adorned with purple and green floral patterns. Her hair is styled in a bun, and she holds a small white lace umbrella with a gold handle. The image captures her elegant appearance and cultural dress. [[img3]] A woman in traditional Asian attire stands in front of a blurred building. She wears a green robe with floral designs and a black hat with lace. A man in a red robe and black hat stands behind her. The scene appears to be set in an Asian country.
/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:01<00:56, 1.16s/it]
4%|▍ | 2/50 [00:02<00:54, 1.13s/it]
6%|▌ | 3/50 [00:03<00:53, 1.15s/it]
8%|▊ | 4/50 [00:04<00:53, 1.15s/it]
10%|█ | 5/50 [00:05<00:52, 1.16s/it]
12%|█▏ | 6/50 [00:06<00:50, 1.16s/it]
14%|█▍ | 7/50 [00:08<00:49, 1.16s/it]
16%|█▌ | 8/50 [00:09<00:48, 1.16s/it]
18%|█▊ | 9/50 [00:10<00:47, 1.16s/it]
20%|██ | 10/50 [00:11<00:46, 1.16s/it]
22%|██▏ | 11/50 [00:12<00:45, 1.16s/it]
24%|██▍ | 12/50 [00:13<00:44, 1.16s/it]
26%|██▌ | 13/50 [00:15<00:42, 1.16s/it]
28%|██▊ | 14/50 [00:16<00:41, 1.16s/it]
30%|███ | 15/50 [00:17<00:40, 1.16s/it]
32%|███▏ | 16/50 [00:18<00:39, 1.16s/it]
34%|███▍ | 17/50 [00:19<00:38, 1.16s/it]
36%|███▌ | 18/50 [00:20<00:37, 1.16s/it]
38%|███▊ | 19/50 [00:22<00:36, 1.16s/it]
40%|████ | 20/50 [00:23<00:34, 1.16s/it]
42%|████▏ | 21/50 [00:24<00:33, 1.16s/it]
44%|████▍ | 22/50 [00:25<00:32, 1.16s/it]
46%|████▌ | 23/50 [00:26<00:31, 1.16s/it]
48%|████▊ | 24/50 [00:27<00:30, 1.16s/it]
50%|█████ | 25/50 [00:28<00:29, 1.16s/it]
52%|█████▏ | 26/50 [00:30<00:27, 1.16s/it]
54%|█████▍ | 27/50 [00:31<00:26, 1.16s/it]
56%|█████▌ | 28/50 [00:32<00:25, 1.16s/it]
58%|█████▊ | 29/50 [00:33<00:24, 1.16s/it]
60%|██████ | 30/50 [00:34<00:23, 1.16s/it]
62%|██████▏ | 31/50 [00:35<00:22, 1.16s/it]
64%|██████▍ | 32/50 [00:37<00:20, 1.16s/it]
66%|██████▌ | 33/50 [00:38<00:19, 1.16s/it]
68%|██████▊ | 34/50 [00:39<00:18, 1.16s/it]
70%|███████ | 35/50 [00:40<00:17, 1.16s/it]
72%|███████▏ | 36/50 [00:41<00:16, 1.16s/it]
74%|███████▍ | 37/50 [00:42<00:15, 1.16s/it]
76%|███████▌ | 38/50 [00:44<00:14, 1.17s/it]
78%|███████▊ | 39/50 [00:45<00:12, 1.17s/it]
80%|████████ | 40/50 [00:46<00:11, 1.16s/it]
82%|████████▏ | 41/50 [00:47<00:10, 1.16s/it]
84%|████████▍ | 42/50 [00:48<00:09, 1.16s/it]
86%|████████▌ | 43/50 [00:49<00:08, 1.16s/it]
88%|████████▊ | 44/50 [00:51<00:06, 1.16s/it]
90%|█████████ | 45/50 [00:52<00:05, 1.16s/it]
92%|█████████▏| 46/50 [00:53<00:04, 1.16s/it]
94%|█████████▍| 47/50 [00:54<00:03, 1.16s/it]
96%|█████████▌| 48/50 [00:55<00:02, 1.16s/it]
98%|█████████▊| 49/50 [00:56<00:01, 1.16s/it]
100%|██████████| 50/50 [00:58<00:00, 1.16s/it]
100%|██████████| 50/50 [00:58<00:00, 1.16s/it]