Comfy-Org/ComfyUI · error · ValueError
Up to {SEED_MAX_IMAGES} images are supported per request.
Error message
Up to {SEED_MAX_IMAGES} images are supported per request. What it means
Raised by the ByteDanceSeedNode before any request when the total number of image frames across all connected image inputs exceeds SEED_MAX_IMAGES (20). The node sums get_number_of_images over every connected image tensor (a batched tensor of N images counts as N), so a single 25-frame batch trips it just like 25 separate images.
Source
Thrown at comfy_api_nodes/nodes_bytedance_llm.py:204
),
)
@classmethod
async def execute(
cls,
prompt: str,
model: dict,
seed: int,
system_prompt: str = "",
) -> IO.NodeOutput:
validate_string(prompt, strip_whitespace=True, min_length=1)
model_label = model["model"]
temperature = model["temperature"]
model_id = SEED_MODELS[model_label]
image_tensors: list[Input.Image] = [t for t in (model.get("images") or {}).values() if t is not None]
if sum(get_number_of_images(t) for t in image_tensors) > SEED_MAX_IMAGES:
raise ValueError(f"Up to {SEED_MAX_IMAGES} images are supported per request.")
video_inputs: list[Input.Video] = [v for v in (model.get("videos") or {}).values() if v is not None]
if len(video_inputs) > SEED_MAX_VIDEOS:
raise ValueError(f"Up to {SEED_MAX_VIDEOS} videos are supported per request.")
content: list[BytePlusMessageContent] = []
if image_tensors:
content.extend(await _build_image_content_blocks(cls, image_tensors))
if video_inputs:
content.extend(await _build_video_content_blocks(cls, video_inputs))
content.append(BytePlusInputText(text=prompt))
response = await sync_op(
cls,
ApiEndpoint(path=BYTEPLUS_RESPONSES_ENDPOINT, method="POST"),
response_model=BytePlusResponseObject,
data=BytePlusResponseCreateRequest(
model=model_id,View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Reduce the connected images/batches so the total frame count is 20 or fewer (split into multiple Seed node runs and merge text outputs).
- Use an ImageBatch/ImageConcat node downstream selection, or trim the batch with an image-picker node before connecting.
- If you need full-video understanding, pass a VIDEO input instead — video frames are counted separately (max 4 videos).
Example fix
// before: images with 24-frame batch -> Seed node // after: trim batch to 20 frames (e.g. ImageCrop/segment nodes) or run two 12-frame requests and combine results
Defensive patterns
Strategy: validation
Validate before calling
SEED_MAX_IMAGES = 20
def total_frames(image_tensors: list) -> int:
return sum(t.shape[0] if t.ndim == 4 else 1 for t in image_tensors)
# before connecting: assert total_frames(images) <= SEED_MAX_IMAGES Prevention
- Remember the limit counts frames, not tensor inputs — batched tensors count per frame.
- Trim large batches (e.g. frame dumps) before wiring into the Seed node.
- Split oversized sets into multiple node runs and merge the text outputs.
When it happens
Trigger: sum(get_number_of_images(t) for connected image tensors) > 20 — e.g. one batched IMAGE tensor of 24 images, or several inputs whose frames total more than 20.
Common situations: Feeding a video frame dump or an image grid batch straight into the Seed LLM; daisy-chaining multiple Load Image (batch) nodes; assuming the limit counts tensor inputs rather than frames.
Related errors
- Up to {SEED_MAX_VIDEOS} videos are supported per request.
- Reference video {index} is too small: {w}x{h} = {pixels:,} t
- Reference video {index} is too large: {w}x{h} = {pixels:,} t
- Custom size out of range: {w}x{h}. Both width and height mus
- Minimum image resolution for the selected model is 3.68MP, b
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/152e0d3519eb21f9.
Report an issue: GitHub.