Open junaidwahid opened 7 months ago
Hello,
If I am not wrong, calling referencenet.clear() before calculating the loss is wrong . I think it will clear the gradients or information for the gradient calculation.
https://github.com/jinxixiang/magic_animate_unofficial/blob/a6f8c8d37cbc5c30a0c5950fb52d60d5b5cdf645/animatediff/magic_animate/pipeline.py#L993
Hello,
If I am not wrong, calling referencenet.clear() before calculating the loss is wrong . I think it will clear the gradients or information for the gradient calculation.
https://github.com/jinxixiang/magic_animate_unofficial/blob/a6f8c8d37cbc5c30a0c5950fb52d60d5b5cdf645/animatediff/magic_animate/pipeline.py#L993