Comfy-Org/ComfyUI · error · ValueError

A cutoff above 0.5 does not make sense.

Error message

A cutoff above 0.5 does not make sense.

What it means

MMAudio VAE LowPassFilter1d raises when cutoff > 0.5: the sinc kernel's cutoff is normalized so 0.5 is Nyquist-relative maximum representable; anything higher is invalid. Fires at construction, before the VAE is used.

Source

Thrown at comfy/ldm/mmaudio/vae/alias_free_torch.py:72

    return filter


class LowPassFilter1d(nn.Module):
    def __init__(self,
                 cutoff=0.5,
                 half_width=0.6,
                 stride: int = 1,
                 padding: bool = True,
                 padding_mode: str = 'replicate',
                 kernel_size: int = 12):
        # kernel_size should be even number for stylegan3 setup,
        # in this implementation, odd number is also possible.
        super().__init__()
        if cutoff < -0.:
            raise ValueError("Minimum cutoff must be larger than zero.")
        if cutoff > 0.5:
            raise ValueError("A cutoff above 0.5 does not make sense.")
        self.kernel_size = kernel_size
        self.even = (kernel_size % 2 == 0)
        self.pad_left = kernel_size // 2 - int(self.even)
        self.pad_right = kernel_size // 2
        self.stride = stride
        self.padding = padding
        self.padding_mode = padding_mode
        filter = kaiser_sinc_filter1d(cutoff, half_width, kernel_size)
        self.register_buffer("filter", filter)

    #input [B, C, T]
    def forward(self, x):
        _, C, _ = x.shape

        if self.padding:
            x = F.pad(x, (self.pad_left, self.pad_right),
                      mode=self.padding_mode)
        out = F.conv1d(x, comfy.model_management.cast_to(self.filter.expand(C, -1, -1), dtype=x.dtype, device=x.device),

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Normalize: cutoff = desired_hz / sample_rate, clamped to <= 0.5
  2. Use the default 0.5
  3. Validate the config values before constructing the VAE

Example fix

# before
LowPassFilter1d(cutoff=0.7)
# after
LowPassFilter1d(cutoff=0.5)
Defensive patterns

Strategy: validation

Validate before calling

cutoff = min(cutoff_hz / sample_rate, 0.5)
assert cutoff <= 0.5

Type guard

def normalized_cutoff(hz: float, sr: float) -> float:
    return min(hz / sr, 0.5)

Prevention

When it happens

Trigger: Passing cutoff > 0.5 directly or via VAE config to the alias-free filter stack of the MMAudio VAE.

Common situations: Using Hz-valued cutoffs in a config meant to be normalized; tuning anti-aliasing strength by raising cutoff past the valid range.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/d1948f82ee4e736f. Report an issue: GitHub.