{"record":{"id":"013b0ffca88a5475","repo":"sgl-project/sglang","slug":"unknown-pair-postprocess-name-name","errorCode":null,"errorMessage":"Unknown pair_postprocess name: {name}","messagePattern":"Unknown pair_postprocess name: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/schedulers/flow_match_pair.py","lineNumber":442,"sourceCode":"                        scale_factor = one_minus_z[-1] / (1 - self.shift_terminal)\n                        if scale_factor != 0:\n                            base = 1 - (one_minus_z / scale_factor)\n\n                    if self.reverse_sigmas:\n                        base = 1 - base\n\n                    if source == \"timesteps\":\n                        return base * self.num_train_timesteps\n                    return base\n\n                col0 = _build_column(visual_shift, visual_denoising_strength, visual_mu)\n                col1 = _build_column(audio_shift, audio_denoising_strength, audio_mu)\n                return torch.stack([col0, col1], dim=1)\n\n            _dual_sigma_shift._requires_source = True\n            self.set_pair_postprocess(_dual_sigma_shift)\n            return\n        raise ValueError(f\"Unknown pair_postprocess name: {name}\")\n\n    def _make_pairs_from_vector(self, vec: torch.Tensor) -> torch.Tensor:\n        if vec.ndim != 1:\n            raise ValueError(\"vec must be 1D\")\n        return torch.stack([vec, vec], dim=1)\n\n    def get_pairs(self, source: str = \"timesteps\") -> torch.Tensor:\n        if source == \"timesteps\":\n            if self.pair_timesteps is None:\n                self._refresh_pair_cache()\n            return self.pair_timesteps\n        if source == \"sigmas\":\n            if self.pair_sigmas is None:\n                self._refresh_pair_cache()\n            return self.pair_sigmas\n        raise ValueError(\"source must be 'timesteps' or 'sigmas'\")\n\n    def timestep_to_sigma(self, timestep: torch.Tensor | float) -> torch.Tensor:","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/schedulers/flow_match_pair.py#L424-L460","documentation":"set_pair_postprocess_by_name only recognizes a fixed set of built-in pair postprocess names (e.g. 'dual_sigma_shift'); any other string reaches the trailing raise. The name is matched before this line, so the value passed is simply not one of the implemented options.","triggerScenarios":"Calling set_pair_postprocess_by_name('sigma_shift') or any typo'd/unimplemented name; forward() also routes to this method when configured with a name string.","commonSituations":"Renamed or upstream-removed postprocess names after a version change; copy-pasting a name from another scheduler codebase.","solutions":["Use the exact supported name, e.g. 'dual_sigma_shift'","If you need custom behavior, pass a callable via set_pair_postprocess(fn) instead of a name","Inspect the if/elif chain above line 442 to enumerate valid names"],"exampleFix":"# before\nsched.set_pair_postprocess_by_name(\"dual_shift\")\n# after\nsched.set_pair_postprocess_by_name(\"dual_sigma_shift\")","handlingStrategy":"validation","validationCode":"VALID = {\"dual_sigma_shift\"}\nif name not in VALID:\n    raise ValueError(f\"unsupported pair_postprocess {name!r}; valid: {VALID}\")","typeGuard":"def is_valid_pair_postprocess(name: str) -> bool:\n    return name == \"dual_sigma_shift\"","tryCatchPattern":null,"preventionTips":["Use a constant/enum for postprocess names","Prefer passing callables for custom behavior"],"tags":["scheduler","invalid-name","enumeration"],"backgroundTag":"invalid-config-parameter","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}