fudan-generative-vision / champ

Champ: Controllable and Consistent Human Image Animation with 3D Parametric Guidance
https://fudan-generative-vision.github.io/champ/
MIT License
4.29k stars 533 forks source link

Guidance Encoder received nan gradient during training #162

Open Jaeger416 opened 2 days ago

Jaeger416 commented 2 days ago

When I look in to each parameter's gradient, I found all attention blocks except for the last one in guidance encoder get nan gradient. If not use accelerate just torch distributed, this will lead to error. And then after looking into the encoder's code, I found lots of attention block are initialized, saved or loaded but only the last layer is used in forward process.