sgl-project/sglang · error · ValueError
ref2va requires at least one of reference_image, reference_v
Error message
ref2va requires at least one of reference_image, reference_video, or reference_audio
What it means
Raised by the ComfyUI SGLDiffusion MiniMax-H3 node when task='ref2va' (reference-to-video) but no reference_image, reference_video, or reference_audio is provided. It mirrors server-side validation locally so the user knows which input to wire.
Source
Thrown at python/sglang/multimodal_gen/apps/ComfyUI_SGLDiffusion/nodes.py:744
"uri": self._material_uri(reference_video),
"role": "reference",
}
)
if reference_audio:
conditions.append(
{
"type": "audio",
"uri": self._material_uri(reference_audio),
"role": "reference",
}
)
# 2. reject wiring the server would reject anyway, but name the input
# the user has to change
if task == "fl2va" and not (first_frame is not None or last_frame is not None):
raise ValueError("fl2va requires first_frame, last_frame, or both")
if task == "ref2va" and not conditions:
raise ValueError(
"ref2va requires at least one of reference_image, "
"reference_video, or reference_audio"
)
if task == "t2va" and conditions:
raise ValueError("t2va takes no conditioning inputs; pick another task")
# 3. `target` resolves the aligned canvas and frame count; the `size`
# the server API always sends is unused by H3
extra_fields = {
"task": task,
"conditions": conditions,
"target": {
"short_edge": short_edge,
"aspect_ratio": aspect_ratio,
"duration_seconds": duration_seconds,
},
"flow_shift": flow_shift,
"audio_flow_shift": audio_flow_shift,View on GitHub (pinned to 0132848349)
Solutions
- Wire at least one of reference_image, reference_video, or reference_audio
- If you have no references, use task 't2va' (text-only)
- If you only have start/end frames, use task 'fl2va'
Example fix
// before task='ref2va', no reference inputs connected // after task='ref2va', reference_image=load_image_output
Defensive patterns
Strategy: validation
Validate before calling
required = ['reference_image','reference_video','reference_audio']
if task == 'ref2va' and not any(globals()[k] is not None for k in required):
raise UserError('ref2va needs a reference input') Try / catch
try: node.generate(...) except ValueError as e: show_user(str(e))
Prevention
- Pre-validate ref2va wiring before queueing the ComfyUI graph
- Disable irrelevant task options in the UI per connected inputs
When it happens
Trigger: Calling generate() with task='ref2va' and all of reference_image, reference_video, reference_audio unset (empty conditions).
Common situations: Choosing ref2va in ComfyUI without attaching any reference nodes; assuming the prompt alone is enough after switching tasks.
Related errors
- fl2va requires first_frame, last_frame, or both
- t2va takes no conditioning inputs; pick another task
- Failed to generate MiniMax-H3 video: {str(e)}
- img_position_ids must be [1, S, 3], got {list(img_position_i
- MiniMax H3 model variant must be a non-empty string
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/17a4976cb0dc05c7.
Report an issue: GitHub.