TemryL / ComfyUI-IDM-VTON

ComfyUI adaptation of IDM-VTON for virtual try-on.
GNU General Public License v3.0
218 stars 26 forks source link

The color doesn't match after changing into clothes #13

Closed xiaoboelse closed 1 month ago

xiaoboelse commented 2 months ago

Thank you for the author's efforts, but the testing was slow and the size did not match well. It must be a multiple of 8, and the most crucial thing is that the color did not match after changing into clothes 微信截图_20240504115339

taoisu commented 1 month ago

Confirming the same issue. On the other hand, this demo page is giving the right result: https://huggingface.co/spaces/yisol/IDM-VTON

Is there a bug?

TemryL commented 1 month ago

Hi guys, yes it is a bug that needs to be fixed! I think it comes from the mask generation with SAM because in the demo the mask is much bigger and does not cover only the clothe but the whole upper body. One idea could be to try to load a manually generated mask and see what happens. If their is still a mismatch color, then probably the preprocessing of the images in the inference pipeline is wrong. Let me know if you can investigate on that. Thanks!

whitepapercg commented 1 month ago

Hi guys, yes it is a bug that needs to be fixed! I think it comes from the mask generation with SAM because in the demo the mask is much bigger and does not cover only the clothe but the whole upper body. One idea could be to try to load a manually generated mask and see what happens. If their is still a mismatch color, then probably the preprocessing of the images in the inference pipeline is wrong. Let me know if you can investigate on that. Thanks!

Hello! I tried using different masks, it didn't help

Also, I compared your code and the original code and didn't notice any errors or misspellings.

TemryL commented 1 month ago

I just updated the input preprocessing which should give more consistent results.

Feel free to try again with your inputs and share your outputs here?

Cheers!