Comfy-Org/ComfyUI · error · ValueError
Video height must be at least {min_height}px, got {height}px
Error message
Video height must be at least {min_height}px, got {height}px What it means
ValueError from validate_video_dimensions when the video's height is below the required minimum. Height comes from video.get_dimensions(); a failure to read dimensions is logged and swallowed (returns None), so this error means the video was read fine but is genuinely too short vertically.
Source
Thrown at comfy_api_nodes/util/validation_utils.py:114
def validate_video_dimensions(
video: Input.Video,
min_width: int | None = None,
max_width: int | None = None,
min_height: int | None = None,
max_height: int | None = None,
):
try:
width, height = video.get_dimensions()
except Exception as e:
logging.error("Error getting dimensions of video: %s", e)
return
if min_width is not None and width < min_width:
raise ValueError(f"Video width must be at least {min_width}px, got {width}px")
if max_width is not None and width > max_width:
raise ValueError(f"Video width must be at most {max_width}px, got {width}px")
if min_height is not None and height < min_height:
raise ValueError(f"Video height must be at least {min_height}px, got {height}px")
if max_height is not None and height > max_height:
raise ValueError(f"Video height must be at most {max_height}px, got {height}px")
def validate_video_duration(
video: Input.Video,
min_duration: float | None = None,
max_duration: float | None = None,
):
try:
duration = video.get_duration()
except Exception as e:
logging.error("Error getting duration of video: %s", e)
return
epsilon = 0.0001
if min_duration is not None and min_duration - epsilon > duration:
raise ValueError(f"Video duration must be at least {min_duration}s, got {duration}s")View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Upscale or re-export at height >= min_height.
- Use HD-or-taller source footage.
- Switch to a node/model with lower minimum height.
Defensive patterns
Strategy: validation
Validate before calling
_, height = video.get_dimensions()
if height < MIN_H:
raise ValueError(f"video too short: {height}px < {MIN_H}px") Prevention
- Use HD-or-taller sources for video API nodes
- Avoid over-downscaling video in the workflow
When it happens
Trigger: validate_video_dimensions(video, min_height=N) with height < N — e.g., a 480p clip into a node requiring min_height=720.
Common situations: SD-resolution sources; wide cinematic crops with short height; workflows that downscale video before an API node.
Related errors
- Video width must be at least {min_width}px, got {width}px
- Video width must be at most {max_width}px, got {width}px
- Video height must be at most {max_height}px, got {height}px
- ar_video sampler requires 5-D video latents [B,C,T,H,W], got
- unknown merge strategy {self.merge_strategy}
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/85f8622bde03fd21.
Report an issue: GitHub.