From f2b7df6bf076f9c9318b829be15bc7c9dd841a2c Mon Sep 17 00:00:00 2001 From: fliptrigga13 <76012365+fliptrigga13@users.noreply.github.com> Date: Fri, 29 May 2026 18:44:59 -0400 Subject: [PATCH] Fix logic flaw identified by autonomous review --- comfy/ldm/mmaudio/vae/vae_modules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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