exo-explore/exo · error · ValueError
Invalid size: {v!r}. Must be one of {get_args(ImageSize)}
Error message
Invalid size: {v!r}. Must be one of {get_args(ImageSize)} What it means
Error "Invalid size: {v!r}. Must be one of {get_args(ImageSize)}" thrown in exo-explore/exo.
Source
Thrown at src/exo/api/types/api.py:352
ImageSize = Literal[
"auto",
"512x512",
"768x768",
"1024x768",
"768x1024",
"1024x1024",
"1024x1536",
"1536x1024",
]
def normalize_image_size(v: object) -> ImageSize:
"""Shared validator for ImageSize fields: maps None → "auto" and rejects invalid values."""
if v is None:
return "auto"
if v not in get_args(ImageSize):
raise ValueError(f"Invalid size: {v!r}. Must be one of {get_args(ImageSize)}")
return v # pyright: ignore[reportReturnType]
class AdvancedImageParams(BaseModel):
seed: Annotated[int, Field(ge=0)] | None = None
num_inference_steps: Annotated[int, Field(ge=1, le=100)] | None = None
guidance: Annotated[float, Field(ge=1.0, le=20.0)] | None = None
negative_prompt: str | None = None
num_sync_steps: Annotated[int, Field(ge=1, le=100)] | None = None
class ImageGenerationTaskParams(BaseModel):
prompt: str
background: str | None = None
model: str
moderation: str | None = None
n: int | None = 1
output_compression: int | None = NoneView on GitHub (pinned to 21a54c5ea0)
When it happens
Trigger: Thrown at src/exo/api/types/api.py:352 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of exo-explore/exo@21a54c5ea0 (2026-08-26).
Data as JSON: /api/errors/ee7222f48445196a.
Report an issue: GitHub.