OOTDiffusion
OOTDiffusion copied to clipboard
Output a black image
Hi, i run the inference code and finally get a black image with a warning: /opt/conda/lib/python3.9/site-packages/diffusers/image_processor.py:97: RuntimeWarning: invalid value encountered in cast images = (images * 255).round().astype("uint8") . It seems something wrong.
Then i change the input size to (576, 768), it gets good result without any warning.
what is the problem?
Hi, i run the inference code and finally get a black image with a warning: /opt/conda/lib/python3.9/site-packages/diffusers/image_processor.py:97: RuntimeWarning: invalid value encountered in cast images = (images * 255).round().astype("uint8") . It seems something wrong.
Then i change the input size to (576, 768), it gets good result without any warning.
what is the problem?
does this work good with any custom images?
@maopian2333 What is your original input? It seems your image format is wrong.
Hi, i run the inference code and finally get a black image with a warning: /opt/conda/lib/python3.9/site-packages/diffusers/image_processor.py:97: RuntimeWarning: invalid value encountered in cast images = (images * 255).round().astype("uint8") . It seems something wrong. Then i change the input size to (576, 768), it gets good result without any warning. what is the problem?
does this work good with any custom images?
@sudip550 I tried both the images in VITON-HD and the images in my own dataset, the results are the same.
Hi, i run the inference code and finally get a black image with a warning: /opt/conda/lib/python3.9/site-packages/diffusers/image_processor.py:97: RuntimeWarning: invalid value encountered in cast images = (images * 255).round().astype("uint8") . It seems something wrong. Then i change the input size to (576, 768), it gets good result without any warning. what is the problem?
does this work good with any custom images?
@sudip550 I tried both the images in VITON-HD and the images in my own dataset, the results are the same.
Can you please show us your results
@maopian2333 What is your original input? It seems your image format is wrong.
@levihsu The inputs are all jpg images. Results are good when image size is resized to (576,768).
`cloth_img = Image.open(cloth_path).resize((576, 768)) model_img = Image.open(model_path).resize((576, 768)) keypoints = openpose_model(model_img.resize((384, 512))) model_parse, _ = parsing_model(model_img.resize((384, 512)))
mask, mask_gray = get_mask_location(model_type, category_dict_utils[category], model_parse, keypoints) mask = mask.resize((576, 768), Image.NEAREST) mask_gray = mask_gray.resize((576, 768), Image.NEAREST)`
@sudip550
It gets good results when input size is resized to (576,768).
It gets black images when input size is resized to (768, 1024) as original.
This problem should be caused by incorrect python package versions. I install the packages following the list you provide, then the results are good without any problem. Thanks for your work!