Comfy-Org/ComfyUI · error · ValueError

Reference video {i} is too short: {dur:.1f}s. Minimum durati

Error message

Reference video {i} is too short: {dur:.1f}s. Minimum duration is 1.8 seconds.

What it means

Each reference video passed to the Seedance 2 reference node must be at least 1.8 seconds long. The node probes duration via video.get_duration() during pre-flight validation (after pixel checks) and rejects clips shorter than the provider minimum, enumerating the offending clip by 1-based position.

Source

Thrown at comfy_api_nodes/nodes_bytedance.py:2796

            max_px = SEEDANCE2_REF_VIDEO_PIXEL_LIMITS.get(model_id, {}).get(model["resolution"], {}).get("max")
            if max_px:
                for key in reference_videos:
                    reference_videos[key] = downscale_video_to_max_pixels(reference_videos[key], max_px)

        if model.get("auto_upscale") and reference_videos:
            min_px = SEEDANCE2_REF_VIDEO_PIXEL_LIMITS.get(model_id, {}).get(model["resolution"], {}).get("min")
            if min_px:
                for key in reference_videos:
                    reference_videos[key] = upscale_video_to_min_pixels(reference_videos[key], min_px)

        total_video_duration = 0.0
        for i, key in enumerate(reference_videos, 1):
            video = reference_videos[key]
            _validate_ref_video_pixels(video, model_id, model["resolution"], i)
            try:
                dur = video.get_duration()
                if dur < 1.8:
                    raise ValueError(f"Reference video {i} is too short: {dur:.1f}s. Minimum duration is 1.8 seconds.")
                total_video_duration += dur
            except ValueError:
                raise
            except Exception:
                pass
        if total_video_duration > limits["max_total_seconds"]:
            raise ValueError(
                f"Total reference video duration is {total_video_duration:.1f}s. "
                f"Maximum is {limits['max_total_seconds']} seconds."
            )

        total_audio_duration = 0.0
        for i, key in enumerate(reference_audios, 1):
            audio = reference_audios[key]
            dur = int(audio["waveform"].shape[-1]) / int(audio["sample_rate"])
            if dur < 1.8:
                raise ValueError(f"Reference audio {i} is too short: {dur:.1f}s. Minimum duration is 1.8 seconds.")
            total_audio_duration += dur

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Replace or extend the short clip so it is at least 2 seconds.
  2. Loop the clip to reach the minimum duration before passing it as a reference.
Defensive patterns

Strategy: validation

Validate before calling

for key, video in reference_videos.items():
    if video.get_duration() < 1.8:
        raise ValueError(f"clip {key} under 1.8s minimum")

Prevention

When it happens

Trigger: A reference_videos entry whose probed duration is under 1.8s (e.g. a 1-second loop, a trimmed fragment, or a near-empty clip from a failed export).

Common situations: Using short loop clips as style references; downstream nodes that produce very short segments; cutting videos with frame-accurate editors that round down.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/5495fd89fcb54fee. Report an issue: GitHub.