diff --git a/comfy/ldm/mmaudio/vae/vae_modules.py b/comfy/ldm/mmaudio/vae/vae_modules.py index 3ad05134b..3fbdf4b49 100644 --- a/comfy/ldm/mmaudio/vae/vae_modules.py +++ b/comfy/ldm/mmaudio/vae/vae_modules.py @@ -17,7 +17,7 @@ def normalize(x, dim=None, eps=1e-4): if dim is None: dim = list(range(1, x.ndim)) norm = torch.linalg.vector_norm(x, dim=dim, keepdim=True, dtype=torch.float32) - norm = torch.add(eps, norm, alpha=math.sqrt(norm.numel() / x.numel())) + norm = torch.add(norm, eps) / math.sqrt(norm.numel() / x.numel()) return x / norm.to(x.dtype) class ResnetBlock1D(nn.Module): @@ -118,4 +118,4 @@ class Downsample1D(nn.Module): if self.with_conv: x = self.conv2(x) - return x + return x \ No newline at end of file