sgl-project/sglang · error · ValueError

t2va takes no conditioning inputs; pick another task

Error message

t2va takes no conditioning inputs; pick another task

What it means

Raised by the ComfyUI SGLDiffusion MiniMax-H3 node when task='t2va' (text-to-video) but conditioning inputs (images/videos/audio references) are connected. t2va is strictly text-only, so any conditioning input is rejected with a hint to pick another task.

Source

Thrown at python/sglang/multimodal_gen/apps/ComfyUI_SGLDiffusion/nodes.py:749

            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,
        }

        request_params = {
            "prompt": positive_prompt,
            "seconds": int(duration_seconds),

View on GitHub (pinned to 0132848349)

Solutions

  1. Disconnect conditioning inputs (first_frame/last_frame/reference_*) when using t2va
  2. Or switch task to 'fl2va'/'ref2va' to actually use those inputs

Example fix

// before
task='t2va', first_frame=connected
// after
task='t2va', first_frame=None
Defensive patterns

Strategy: validation

Validate before calling

cond = [x for x in (first_frame, last_frame, reference_image, reference_video, reference_audio) if x is not None]
if task == 't2va' and cond:
    raise UserError('t2va takes no conditioning inputs')

Try / catch

try: node.generate(...) except ValueError as e: show_user(str(e))

Prevention

When it happens

Trigger: Calling generate() with task='t2va' while conditions is non-empty, i.e. any reference or frame input is wired.

Common situations: Leaving stale image connections in the graph after switching the task dropdown from fl2va/ref2va back to t2va.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/e8a00ef858e8c7da. Report an issue: GitHub.