Comfy-Org/ComfyUI · error · ValueError

sync.so rejects images above 4K (4096x2160); got {width}x{he

Error message

sync.so rejects images above 4K (4096x2160); got {width}x{height}. Downscale the image first or enable auto_downscale.

What it means

The sync.so talking-image node validates the input image against the provider's 4K cap before uploading: max(width, height) must be <= 4096 and width*height <= 4096*2160. When the image exceeds either bound and the model dict's auto_downscale flag is False, it raises ValueError immediately instead of letting the API reject the request. This is a client-side pre-flight check mirroring sync.so's server limit.

Source

Thrown at comfy_api_nodes/nodes_sync_so.py:322

    @classmethod
    async def execute(
        cls,
        image: Input.Image,
        audio: Input.Audio,
        prompt: str,
        seed: int,
        model: dict,
    ) -> IO.NodeOutput:
        if get_number_of_images(image) != 1:
            raise ValueError("Exactly one image is required; got a batch. Pick one frame first.")
        validate_audio_duration(audio, max_duration=600)

        height, width = get_image_dimensions(image)
        speaker_x, speaker_y = model["speaker_x"], model["speaker_y"]
        if max(width, height) > 4096 or width * height > 4096 * 2160:
            if not model["auto_downscale"]:
                raise ValueError(
                    f"sync.so rejects images above 4K (4096x2160); got {width}x{height}. "
                    "Downscale the image first or enable auto_downscale."
                )
            image = downscale_image_tensor(image, total_pixels=4096 * 2160)
            image = downscale_image_tensor_by_max_side(image, max_side=4096)
            new_height, new_width = get_image_dimensions(image)
            # speaker coordinates are given in the original image's pixel space
            speaker_x = min(new_width - 1, round(speaker_x * new_width / width))
            speaker_y = min(new_height - 1, round(speaker_y * new_height / height))

        if model["speaker_selection"] == "coordinates":
            speaker_detection = SyncActiveSpeakerDetection(
                frame_number=0,  # images have a single frame; auto_detect is rejected by the API
                coordinates=[speaker_x, speaker_y],
            )
        else:
            speaker_detection = None

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Enable auto_downscale on the SyncTalkingImage model input (node UI toggle); the node then downscales to the cap and rescales the speaker_x/speaker_y coordinates automatically.
  2. Downscale the image before the node with a standard image resize/downscale node so max side <= 4096 and total pixels <= 4096*2160.
  3. If you need full-resolution output, run sync.so at 4K-or-less and upscale the returned video afterwards instead of the input image.

Example fix

// before: 6000x4000 image, auto_downscale = False -> ValueError
// after: enable auto_downscale in the model loader / node config
model["auto_downscale"] = True
image = talking_image(image=image, audio=audio, model=model)
Defensive patterns

Strategy: validation

Validate before calling

h, w = get_image_dimensions(image)
if (max(w, h) > 4096 or w * h > 4096 * 2160) and not model["auto_downscale"]:
    image = downscale_image_tensor_by_max_side(
        downscale_image_tensor(image, total_pixels=4096 * 2160), max_side=4096
    )

Prevention

When it happens

Trigger: Calling SyncTalkingImageNode.execute with an image larger than 4096 on the long side or more than 4096*2160 total pixels while model['auto_downscale'] is False (the node's toggle is off).

Common situations: Feeding high-resolution photos or upscaled renders (e.g. 6000x4000 portraits) into the talking-image node without resizing; workflows built for lower-res inputs later given print-resolution sources; users unaware of the auto_downscale option in the node's model config.

Related errors


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