diff --git a/pyproject.toml b/pyproject.toml index 621ff52..b6e50e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ComfyUI-WanVideoWrapper" description = "ComfyUI wrapper nodes for WanVideo" -version = "1.1.9" +version = "1.2.0" license = {file = "LICENSE"} dependencies = ["accelerate >= 1.2.1", "diffusers >= 0.32.0", "ftfy"] diff --git a/wanvideo/modules/model.py b/wanvideo/modules/model.py index b8a802f..e1ba09d 100644 --- a/wanvideo/modules/model.py +++ b/wanvideo/modules/model.py @@ -384,8 +384,8 @@ class WanSelfAttention(nn.Module): nag_guidance = x_positive * nag_scale - x_negative * (nag_scale - 1) - norm_positive = torch.norm(x_positive, p=1, dim=-1, keepdim=True).expand_as(x_positive) - norm_guidance = torch.norm(nag_guidance, p=1, dim=-1, keepdim=True).expand_as(nag_guidance) + norm_positive = torch.norm(x_positive, p=1, dim=-1, keepdim=True) + norm_guidance = torch.norm(nag_guidance, p=1, dim=-1, keepdim=True) scale = norm_guidance / norm_positive scale = torch.nan_to_num(scale, nan=10.0)