{"record":{"id":"152e0d3519eb21f9","repo":"Comfy-Org/ComfyUI","slug":"up-to-seed-max-images-images-are-supported-per-r","errorCode":null,"errorMessage":"Up to {SEED_MAX_IMAGES} images are supported per request.","messagePattern":"Up to (.+?) images are supported per request\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance_llm.py","lineNumber":204,"sourceCode":"            ),\n        )\n\n    @classmethod\n    async def execute(\n        cls,\n        prompt: str,\n        model: dict,\n        seed: int,\n        system_prompt: str = \"\",\n    ) -> IO.NodeOutput:\n        validate_string(prompt, strip_whitespace=True, min_length=1)\n        model_label = model[\"model\"]\n        temperature = model[\"temperature\"]\n        model_id = SEED_MODELS[model_label]\n\n        image_tensors: list[Input.Image] = [t for t in (model.get(\"images\") or {}).values() if t is not None]\n        if sum(get_number_of_images(t) for t in image_tensors) > SEED_MAX_IMAGES:\n            raise ValueError(f\"Up to {SEED_MAX_IMAGES} images are supported per request.\")\n\n        video_inputs: list[Input.Video] = [v for v in (model.get(\"videos\") or {}).values() if v is not None]\n        if len(video_inputs) > SEED_MAX_VIDEOS:\n            raise ValueError(f\"Up to {SEED_MAX_VIDEOS} videos are supported per request.\")\n\n        content: list[BytePlusMessageContent] = []\n        if image_tensors:\n            content.extend(await _build_image_content_blocks(cls, image_tensors))\n        if video_inputs:\n            content.extend(await _build_video_content_blocks(cls, video_inputs))\n        content.append(BytePlusInputText(text=prompt))\n\n        response = await sync_op(\n            cls,\n            ApiEndpoint(path=BYTEPLUS_RESPONSES_ENDPOINT, method=\"POST\"),\n            response_model=BytePlusResponseObject,\n            data=BytePlusResponseCreateRequest(\n                model=model_id,","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance_llm.py#L186-L222","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"// before: images with 24-frame batch -> Seed node\n// after:  trim batch to 20 frames (e.g. ImageCrop/segment nodes) or run two 12-frame requests and combine results","handlingStrategy":"validation","validationCode":"SEED_MAX_IMAGES = 20\n\ndef total_frames(image_tensors: list) -> int:\n    return sum(t.shape[0] if t.ndim == 4 else 1 for t in image_tensors)\n\n# before connecting: assert total_frames(images) <= SEED_MAX_IMAGES","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["comfyui","bytedance","seed-llm","validation","limit","image-batch"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}