calesthio/OpenMontage · error · ValueError
local image width and height must each be 300 to 6000 pixels
Error message
local image width and height must each be 300 to 6000 pixels
What it means
Error "local image width and height must each be 300 to 6000 pixels" thrown in calesthio/OpenMontage.
Source
Thrown at tools/video/seedance_ark.py:1065
self._probe_local_audio_duration(path)
encoded = base64.b64encode(path.read_bytes()).decode("ascii")
return f"data:{mime};base64,{encoded}"
def _validate_local_image(self, path: Path) -> None:
self._validate_image_bytes(path.read_bytes(), str(path))
@staticmethod
def _validate_image_bytes(data: bytes, source: str) -> None:
try:
from PIL import Image
with Image.open(io.BytesIO(data)) as image:
width, height = image.size
image.verify()
except Exception as exc:
raise ValueError(f"image is unreadable or corrupt: {source}") from exc
if not (300 <= width <= 6000 and 300 <= height <= 6000):
raise ValueError(
"local image width and height must each be 300 to 6000 pixels"
)
ratio = width / height
if not 0.4 <= ratio <= 2.5:
raise ValueError(
"local image width/height ratio must be between 0.4 and 2.5"
)
def _validate_data_uri(
self,
value: str,
*,
suffix_to_mime: dict[str, str],
max_bytes: int,
label: str,
) -> str:
mime, decoded = self._decode_data_uri(
value,View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Resize the image so both width and height are between 300 and 6000 pixels.
- Crop or pad images that are too small rather than upscaling far beyond the original.
When it happens
Trigger: A local reference image has width or height outside the allowed 300-6000 pixel range.
Common situations: See trigger scenarios.
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/2ea8c84218a559f5.
Report an issue: GitHub.