sgl-project/sglang · error · ValueError
fl2va requires first_frame, last_frame, or both
Error message
fl2va requires first_frame, last_frame, or both
What it means
Raised by the ComfyUI SGLDiffusion MiniMax-H3 generate node when the task is 'fl2va' (frame-to-video) but neither first_frame nor last_frame is connected. The node pre-validates wiring the server would reject anyway, so the user is told exactly which input to fix.
Source
Thrown at python/sglang/multimodal_gen/apps/ComfyUI_SGLDiffusion/nodes.py:742
{
"type": "video",
"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,
},View on GitHub (pinned to 0132848349)
Solutions
- Connect at least one of first_frame or last_frame to an image node
- If you only have text, switch task to 't2va'
- If you have references instead of frames, use task 'ref2va' and wire reference inputs
Example fix
// before task='fl2va', first_frame=None, last_frame=None // after task='fl2va', first_frame=load_image_node_output, last_frame=None
Defensive patterns
Strategy: validation
Validate before calling
if task == 'fl2va' and first_frame is None and last_frame is None:
raise UserError('wire first_frame or last_frame for fl2va') Try / catch
try: node.generate(...) except ValueError as e: show_user(str(e))
Prevention
- Validate task/input pairs before executing the workflow
- Build task->required-inputs lookup table in your graph loader
When it happens
Trigger: Calling the ComfyUI node generate() with task='fl2va' while first_frame=None and last_frame=None (both IMAGE inputs left unconnected).
Common situations: Selecting the fl2va task in the ComfyUI dropdown but forgetting to wire a start/end frame; switching tasks from t2va to fl2va without updating the graph inputs.
Related errors
- ref2va requires at least one of reference_image, reference_v
- 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/96ff7b1954584c16.
Report an issue: GitHub.