lllyasviel commited on
Commit
a396caf
·
1 Parent(s): fbbf2aa
sgm/modules/diffusionmodules/util.py CHANGED
@@ -272,8 +272,8 @@ class SiLU(nn.Module):
272
 
273
  class GroupNorm32(nn.GroupNorm):
274
  def forward(self, x):
275
- self.weight.to(torch.float32)
276
- self.bias.to(torch.float32)
277
  return super().forward(x.float()).type(x.dtype)
278
 
279
 
 
272
 
273
  class GroupNorm32(nn.GroupNorm):
274
  def forward(self, x):
275
+ self.weight = self.weight.float()
276
+ self.bias = self.bias.float()
277
  return super().forward(x.float()).type(x.dtype)
278
 
279