Zejun-Yang / AniPortrait

AniPortrait: Audio-Driven Synthesis of Photorealistic Portrait Animation
Apache License 2.0
4.54k stars 570 forks source link

Train Stage 1 RuntimeError #149

Closed 1595813520 closed 4 months ago

1595813520 commented 4 months ago

作者您好,我在训练stage1时遇到了报错:RuntimeError: mat1 and mat2 must have the same dtype 如图所示: f1f0c0f9b6ca376599c6bf9817f1b11 unet_2d_condition.py的报错位置: emb = self.time_embedding(t_emb, timestep_cond) aug_emb = None 我调试发现这里的timestep_cond是NoneType,而t_emd是torch.float32类型: image 请问该如何解决呢?期待您的回复,非常感谢!

Zejun-Yang commented 4 months ago

看起来是diffusers.models.embeddings.TimestepEmbedding库函数有差异,请确保您的代码环境中,diffusers==0.24.0

1595813520 commented 4 months ago

看起来是diffusers.models.embeddings.TimestepEmbedding库函数有差异,请确保您的代码环境中,diffusers==0.24.0

感谢作者您的回复,我安装的diffusers库和其他库版本均无误,请问还有可能是什么原因呢?期待您的回复,非常感谢

Zejun-Yang commented 4 months ago

那就不是这里的问题。因为TimestepEmbedding支持timestep_cond=None时的输入。报错中的mat1和mat2指的可能不是t_emb和timestep_cond。请查看t_emb变量和模型权重的数据类型是否一致。