mudler/LocalAI · error · ValueError
resolution must be 480p or 720p
Error message
resolution must be 480p or 720p
What it means
ValueError raised during longcat-video model loading when the 'resolution' option is anything other than '480p' or '720p' (case-insensitive, default '480p'). LongCat-Video pipelines are compiled/trained at fixed resolutions, so the value is validated and normalized before being stored into self.options.
Source
Thrown at backend/python/longcat-video/backend.py:167
if not self.torch.cuda.is_available():
return self._fail(
context,
grpc.StatusCode.FAILED_PRECONDITION,
"longcat-video requires an NVIDIA CUDA GPU",
)
if request.TensorParallelSize > 1:
return self._fail(
context,
grpc.StatusCode.UNIMPLEMENTED,
"longcat-video currently supports one GPU per backend process",
)
self._import_runtime()
attention_name = str(options.get("attention_backend", "sdpa")).lower()
attention_overrides(attention_name)
resolution = str(options.get("resolution", "480p")).lower()
if resolution not in {"480p", "720p"}:
raise ValueError("resolution must be 480p or 720p")
use_distill_default = model_kind == MODEL_KIND_AVATAR
use_distill = require_bool(
options.get("use_distill", use_distill_default),
"use_distill",
)
use_int8 = require_bool(options.get("use_int8", False), "use_int8")
if model_kind == MODEL_KIND_BASE and use_int8:
raise ValueError(
"use_int8 is supported only by LongCat-Video-Avatar-1.5"
)
self.options = {
**options,
"attention_backend": attention_name,
"resolution": resolution,
"use_distill": use_distill,
"use_int8": use_int8,View on GitHub (pinned to 44413a9d06)
Solutions
- Set resolution to exactly '480p' or '720p' (any casing) or omit it to get the 480p default
- Remove custom resolution strings like widthxheight from longcat-video options
Example fix
# before options: resolution: 1080p # after options: resolution: 720p
Defensive patterns
Strategy: validation
Validate before calling
VALID_RESOLUTIONS = {"480p", "720p"}
def normalize_resolution(options: dict) -> dict:
res = str(options.get("resolution", "480p")).strip().lower()
if res not in VALID_RESOLUTIONS:
raise ValueError(f"resolution must be one of {sorted(VALID_RESOLUTIONS)}, got {options.get('resolution')!r}")
return {**options, "resolution": res} Type guard
def is_valid_resolution(value) -> bool:
return isinstance(value, str) and value.strip().lower() in {"480p", "720p"} Try / catch
try:
stub.LoadModel(model_options)
except grpc.RpcError as e:
if "resolution must be" in (e.details() or ""):
model_options["options"]["resolution"] = "480p"
stub.LoadModel(model_options)
else:
raise Prevention
- Treat resolution as an enum in your config layer, not free-form text
- Centralize longcat-video option normalization in one helper used by every model config
When it happens
Trigger: LoadModel with options {"resolution": "1080p"} or "480" or "hd"; passing a numeric resolution like "854x480"; a typo such as "720P " is fine (lowercased) but "720" is not.
Common situations: User assumes arbitrary resolutions are supported because other video backends accept width/height; copy-pasting resolution strings from diffusion configs.
Related errors
- use_int8 is supported only by LongCat-Video-Avatar-1.5
- num_frames must not be negative
- base_model must point to a LongCat-Video checkpoint
- request needs {segments} avatar segments, but max_segments i
- {name} must be true or false
AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15).
Data as JSON: /api/errors/c6eb535d920a796a.
Report an issue: GitHub.