Comfy-Org/ComfyUI · error · ValueError
FLUX 3 supports at most {_FLUX3_MAX_IMAGES} {field_name}, go
Error message
FLUX 3 supports at most {_FLUX3_MAX_IMAGES} {field_name}, got {len(flat)}. What it means
FLUX 3 accepts at most 10 images per field (keyframes or conditioning frames). _flux3_collect_images flattens every Autogrow slot (each possibly a 4D batch) into single images and raises if the total exceeds _FLUX3_MAX_IMAGES before validating dimensions.
Source
Thrown at comfy_api_nodes/nodes_bfl.py:1050
if max(width, height) > _FLUX3_MAX_IMAGE_ASPECT * min(width, height):
raise ValueError(
f"Image aspect ratio is too extreme ({width}x{height}); "
f"FLUX 3 accepts at most {_FLUX3_MAX_IMAGE_ASPECT}:1."
)
def _flux3_collect_images(images: dict | None, field_name: str) -> list[torch.Tensor]:
"""Flatten Autogrow slots (each possibly batched) into single images and validate them."""
flat: list[torch.Tensor] = []
for tensor in (images or {}).values():
if tensor is None:
continue
if tensor.ndim == 4:
flat.extend(tensor[i] for i in range(tensor.shape[0]))
else:
flat.append(tensor)
if len(flat) > _FLUX3_MAX_IMAGES:
raise ValueError(f"FLUX 3 supports at most {_FLUX3_MAX_IMAGES} {field_name}, got {len(flat)}.")
for tensor in flat:
_flux3_validate_image(tensor)
return flat
def _flux3_parse_times(value: str, image_count: int, duration: int | str) -> list[float]:
"""Parse one keyframe time in seconds per image: increasing, inside the clip."""
parts = [part.strip() for part in value.split(",") if part.strip()]
if len(parts) != image_count:
raise ValueError(
f"Give one time per keyframe image: got {len(parts)} time(s) for {image_count} image(s)."
)
try:
times = [float(part) for part in parts]
except ValueError as exc:
raise ValueError(f"Keyframe times must be numbers in seconds, comma-separated; got '{value}'.") from exc
if not all(math.isfinite(time) for time in times):
raise ValueError(f"Keyframe times must be finite numbers in seconds; got '{value}'.")View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Keep the flattened total at or below 10 images.
- Select the most representative keyframes instead of wiring every frame.
- Split into sequential generations if more coverage is needed.
Example fix
# before flat = flatten(image_slots) # 14 images -> ValueError # after flat = flatten(image_slots)[:10]
Defensive patterns
Strategy: validation
Validate before calling
flat = [t for tensor in (images or {}).values() if tensor is not None
for t in (list(tensor) if tensor.ndim == 4 else [tensor])]
assert len(flat) <= 10, f"FLUX 3 max 10 images, got {len(flat)}" Type guard
def flux3_image_count_ok(images: dict | None) -> bool:
n = 0
for t in (images or {}).values():
if t is None:
continue
n += t.shape[0] if t.ndim == 4 else 1
return n <= 10 Prevention
- The 10-image cap counts flattened frames across all slots.
- Curate keyframes rather than connecting full sequences.
- Split long sequences into multiple generations.
When it happens
Trigger: Connecting Autogrow image inputs whose flattened frame total exceeds 10, e.g. three slots holding 4-frame batches.
Common situations: Assuming the limit is per-slot rather than global; connecting frame-sequence batches intended for other video models.
Related errors
- Give one time per keyframe image: got {len(parts)} time(s) f
- Keyframe times must increase; got {times}.
- Keyframe times cannot be negative; got {times[0]}.
- The current maximum number of supported images is 8.
- Image aspect ratio is too extreme ({width}x{height}); FLUX 3
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/533837d3670d2af7.
Report an issue: GitHub.