ali-vilab / AnyDoor

Official implementations for paper: Anydoor: zero-shot object-level image customization
https://ali-vilab.github.io/AnyDoor-Page/
MIT License
4.01k stars 368 forks source link

different results between HF demo and inference result for virtual try-on #66

Closed zz8615 closed 10 months ago

zz8615 commented 10 months ago

Huggingface

db6b35e2ead9d9a03a702ab9d2020b59_1233523

inference:

60670d1d435f7f6239ef7d162aa38303_2069387

Hi, I have run the inference code and the huggingface demo using the same parameters. However, the huggingface demo seems to produce better results. I do understand that the masks are different as one needs to draw the mask by hand on HF. I was wondering if the model weights you released and the model used on HF are the same? What would contribute to the difference?

XavierCHEN34 commented 10 months ago

The weights are the same. The difference is that, when you use the validation code, the target masks are extracted by the GT masks, like the vest in this case. This causes the problem that the mask for the vest is not suitable for a T-shirt. However, when you use the HF demo, you would manually draw the suitable mask for the T-shirt

zz8615 commented 10 months ago

The weights are the same. The difference is that, when you use the validation code, the target masks are extracted by the GT masks, like the vest in this case. This causes the problem that the mask for the vest is not suitable for a T-shirt. However, when you use the HF demo, you would manually draw the suitable mask for the T-shirt

Thank you. I was wondering how to enable shape control as well in the code, there is that option on HF.

XavierCHEN34 commented 10 months ago

You could refer to some snippets at https://huggingface.co/spaces/xichenhku/AnyDoor-online/blob/fdd218f324c1a0150611892497acc382d5ca852a/app.py#L191-L194