calesthio/OpenMontage · error · ValueError

local {label} must be smaller than {max_bytes // (1024 * 102

Error message

local {label} must be smaller than {max_bytes // (1024 * 1024)} MB

What it means

Error "local {label} must be smaller than {max_bytes // (1024 * 1024)} MB" thrown in calesthio/OpenMontage.

Source

Thrown at tools/video/seedance_ark.py:1031

        value = str(ref)
        if value.startswith("data:"):
            return self._validate_data_uri(
                value,
                suffix_to_mime=suffix_to_mime,
                max_bytes=max_bytes,
                label=label,
            )
        if self._is_remote_or_asset(value):
            return value
        path = Path(value).expanduser()
        if not path.is_file():
            raise ValueError(
                f"{label} reference must be a public URL, asset:// ID, "
                f"or existing local file: {value}"
            )
        size = path.stat().st_size
        if size >= max_bytes:
            raise ValueError(
                f"local {label} must be smaller than {max_bytes // (1024 * 1024)} MB"
            )
        suffix = path.suffix.lower()
        mime = suffix_to_mime.get(suffix)
        if not mime:
            guessed, _ = mimetypes.guess_type(path.name)
            mime = guessed if guessed in suffix_to_mime.values() else None
        if not mime:
            formats = ", ".join(sorted(suffix_to_mime))
            raise ValueError(
                f"unsupported local {label} format; expected one of {formats}"
            )
        if label == "image":
            self._validate_local_image(path)
        elif label == "audio":
            self._probe_local_audio_duration(path)
        encoded = base64.b64encode(path.read_bytes()).decode("ascii")
        return f"data:{mime};base64,{encoded}"

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Downscale or recompress the local file to below the stated MB limit (e.g. with ffmpeg or Pillow).
  2. Or upload the original to a URL/asset and reference it remotely instead of inline.

When it happens

Trigger: A local reference file exceeds the maximum allowed byte size for Seedance Ark reference media.

Common situations: See trigger scenarios.


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/38eecf6f32d4a67a. Report an issue: GitHub.