This commit is contained in:
lvmin
2023-08-09 14:27:40 -07:00
parent 8807b2dff8
commit 69f57c0454
3 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ class SiLU(nn.Module):
class GroupNorm32(nn.GroupNorm):
def forward(self, x):
return super().forward(x.float()).type(x.dtype)
return super().forward(x)
def conv_nd(dims, *args, **kwargs):
+1 -1
View File
@@ -166,7 +166,7 @@ class GeneralConditioner(nn.Module):
emb = torch.zeros_like(emb)
if out_key in output:
output[out_key] = torch.cat(
(output[out_key], emb), self.KEY2CATDIM[out_key]
(output[out_key].cuda(), emb.cuda()), self.KEY2CATDIM[out_key]
)
else:
output[out_key] = emb