guoqincode / Open-AnimateAnyone

Unofficial Implementation of Animate Anyone
2.89k stars 233 forks source link

Is classifier-free guidance embedded in attention 1 correctly? #38

Closed xingpeima closed 8 months ago

xingpeima commented 8 months ago

https://github.com/guoqincode/AnimateAnyone-unofficial/blob/main/models/ReferenceNet_attention.py#L153

In AnimateAnyone paper, attention1 is responsible for spatial-attention operation,encoder_hidden_states is embedded in attention2, and Is it correct to apply classifier-free guidance to attention2? Or for image, is it only necessary to set uncodition image_embeddings to 0 before input unet?

guoqincode commented 8 months ago

Thank you very much. I'll check later.