{"record":{"id":"10ece73b4f4037ea","repo":"sgl-project/sglang","slug":"fl2va-denoising-requires-encoded-keyframe-conditio","errorCode":null,"errorMessage":"fl2va denoising requires encoded keyframe condition rows","messagePattern":"fl2va denoising requires encoded keyframe condition rows","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/denoising.py","lineNumber":92,"sourceCode":"    )\n    if audio_noise_aug is None:\n        audio_noise_aug = MINIMAX_H3_AUDIO_REF_COND_TIMESTEP\n    return float(imgvid_noise_aug), float(audio_noise_aug)\n\n\ndef _validate_keyframe_payload(plan: Any, keyframe: Any) -> None:\n    \"\"\"Reject stale/middle/reordered keyframe payloads at the DiT sink.\"\"\"\n\n    task = None if plan is None else str(plan.task)\n    if task not in {\"fl2va\", \"ref2va\"}:\n        if keyframe is not None:\n            raise ValueError(\n                \"keyframe condition rows require plan.task='fl2va' or 'ref2va'\"\n            )\n        return\n    if keyframe is None:\n        if task == \"fl2va\":\n            raise ValueError(\"fl2va denoising requires encoded keyframe condition rows\")\n        return\n    if not isinstance(keyframe, Mapping):\n        raise ValueError(\"encoded keyframe condition rows must be a mapping\")\n\n    semantic_indices = tuple(keyframe.get(\"semantic_frame_indices\") or ())\n    if semantic_indices not in MINIMAX_H3_FL2VA_KEYFRAME_SIGNATURES:\n        raise ValueError(\n            \"keyframe denoising requires semantic_frame_indices in \"\n            f\"{MINIMAX_H3_FL2VA_KEYFRAME_SIGNATURES!r}, \"\n            f\"got {semantic_indices!r}\"\n        )\n    frame_count = keyframe.get(\"frame_count\")\n    if isinstance(frame_count, bool) or not isinstance(frame_count, int):\n        raise ValueError(\"keyframe payload requires an integer frame_count\")\n    if frame_count <= 1:\n        raise ValueError(\"keyframe payload frame_count must be greater than one\")\n    pixel_indices = keyframe.get(\"pixel_frame_indices\")\n    expected_pixel_indices = [","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/denoising.py#L74-L110","documentation":"For task 'fl2va' (first/last-frame-to-video) the denoiser requires encoded keyframe condition rows; a None keyframe payload at the DiT sink raises this ValueError.","triggerScenarios":"Running fl2va where the audio-encoding/keyframe stages failed to attach the encoded keyframe rows, or they were dropped between stages.","commonSituations":"Stage ordering bugs that skip the keyframe encoding stage; batches mutated/cleared between encode and denoise; ref2va (where keyframes are optional) request mislabeled as fl2va.","solutions":["Verify the keyframe encoding stage ran and attached rows to the batch before denoising","If the request has no keyframes, use a task other than fl2va (e.g. t2v)","Debug stage order in the pipeline so encoded keyframes survive to the sink"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if plan.task == \"fl2va\":\n    assert batch.keyframe is not None, \"encoded keyframe rows missing\"","typeGuard":"def fl2va_ready(plan, batch) -> bool:\n    return plan.task != \"fl2va\" or batch.keyframe is not None","tryCatchPattern":null,"preventionTips":["Verify keyframe-encode stage ran before denoise","Use non-keyframe tasks when no keyframes exist"],"tags":["minimax-h3","fl2va","keyframe","missing-input"],"backgroundTag":"missing-required-field","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}