Comfy-Org/ComfyUI · error · Exception

Total size of all images exceeds 5 MB limit.

Error message

Total size of all images exceeds 5 MB limit.

What it means

Error "Total size of all images exceeds 5 MB limit." thrown in Comfy-Org/ComfyUI.

Source

Thrown at comfy_api_nodes/nodes_recraft.py:381

        files = []
        total_size = 0
        max_total_size = 5 * 1024 * 1024  # 5 MB limit
        for i, img in enumerate(list(images.values())):
            file_bytes = tensor_to_bytesio(img, total_pixels=2048 * 2048, mime_type="image/webp").read()
            total_size += len(file_bytes)
            if total_size > max_total_size:
                raise Exception("Total size of all images exceeds 5 MB limit.")
            files.append((f"file{i + 1}", file_bytes))

        response = await sync_op(

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Reduce the number or size of images so the total is under 5 MB.

When it happens

Trigger: Thrown at comfy_api_nodes/nodes_recraft.py:381 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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