{"record":{"id":"81372275c32354ae","repo":"Comfy-Org/ComfyUI","slug":"minimum-cutoff-must-be-larger-than-zero-813722","errorCode":null,"errorMessage":"Minimum cutoff must be larger than zero.","messagePattern":"Minimum cutoff must be larger than zero\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/mmaudio/vae/alias_free_torch.py","lineNumber":70,"sourceCode":"        filter_ /= filter_.sum()\n        filter = filter_.view(1, 1, kernel_size)\n\n    return filter\n\n\nclass LowPassFilter1d(nn.Module):\n    def __init__(self,\n                 cutoff=0.5,\n                 half_width=0.6,\n                 stride: int = 1,\n                 padding: bool = True,\n                 padding_mode: str = 'replicate',\n                 kernel_size: int = 12):\n        # kernel_size should be even number for stylegan3 setup,\n        # in this implementation, odd number is also possible.\n        super().__init__()\n        if cutoff < -0.:\n            raise ValueError(\"Minimum cutoff must be larger than zero.\")\n        if cutoff > 0.5:\n            raise ValueError(\"A cutoff above 0.5 does not make sense.\")\n        self.kernel_size = kernel_size\n        self.even = (kernel_size % 2 == 0)\n        self.pad_left = kernel_size // 2 - int(self.even)\n        self.pad_right = kernel_size // 2\n        self.stride = stride\n        self.padding = padding\n        self.padding_mode = padding_mode\n        filter = kaiser_sinc_filter1d(cutoff, half_width, kernel_size)\n        self.register_buffer(\"filter\", filter)\n\n    #input [B, C, T]\n    def forward(self, x):\n        _, C, _ = x.shape\n\n        if self.padding:\n            x = F.pad(x, (self.pad_left, self.pad_right),","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/mmaudio/vae/alias_free_torch.py#L52-L88","documentation":"MMAudio VAE copy of the alias-free LowPassFilter1d: raises when cutoff < 0. Cutoff is normalized (0..0.5 relative to Nyquist) for the Kaiser sinc filter, so negative values are rejected at module construction. Config-driven: the value normally comes from the VAE's JSON config.","triggerScenarios":"Constructing the MMAudio VAE with a config where any alias-free stage has a negative cutoff, or instantiating LowPassFilter1d directly with cutoff < 0.","commonSituations":"Editing mmaudio VAE config to tune anti-aliasing; porting configs between BigVGAN-family repos with different cutoff conventions; sentinel defaults (-1) leaking into config.","solutions":["Set cutoff in [0, 0.5] (default 0.5)","Inspect the VAE config JSON used to build the alias-free modules","Restore the original config shipped with the MMAudio checkpoint"],"exampleFix":"# before\nLowPassFilter1d(cutoff=-0.1)\n# after\nLowPassFilter1d(cutoff=0.1)","handlingStrategy":"validation","validationCode":"for stage in cfg.get('stages', []):\n    c = stage.get('cutoff', 0.5)\n    assert 0.0 <= c <= 0.5, f'bad cutoff {c} in stage {stage}'","typeGuard":"def is_valid_cutoff(c: float) -> bool:\n    return isinstance(c, (int, float)) and 0.0 <= c <= 0.5","tryCatchPattern":null,"preventionTips":["Validate VAE configs before constructing alias-free modules","Never use -1 sentinels for cutoff in configs"],"tags":["mmaudio","vae","audio","config","validation"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}