{"record":{"id":"584c53b12391101c","repo":"mudler/LocalAI","slug":"use-int8-is-supported-only-by-longcat-video-avatar","errorCode":null,"errorMessage":"use_int8 is supported only by LongCat-Video-Avatar-1.5","messagePattern":"use_int8 is supported only by LongCat-Video-Avatar-1\\.5","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"backend/python/longcat-video/backend.py","lineNumber":176,"sourceCode":"                    grpc.StatusCode.UNIMPLEMENTED,\n                    \"longcat-video currently supports one GPU per backend process\",\n                )\n            self._import_runtime()\n\n            attention_name = str(options.get(\"attention_backend\", \"sdpa\")).lower()\n            attention_overrides(attention_name)\n            resolution = str(options.get(\"resolution\", \"480p\")).lower()\n            if resolution not in {\"480p\", \"720p\"}:\n                raise ValueError(\"resolution must be 480p or 720p\")\n\n            use_distill_default = model_kind == MODEL_KIND_AVATAR\n            use_distill = require_bool(\n                options.get(\"use_distill\", use_distill_default),\n                \"use_distill\",\n            )\n            use_int8 = require_bool(options.get(\"use_int8\", False), \"use_int8\")\n            if model_kind == MODEL_KIND_BASE and use_int8:\n                raise ValueError(\n                    \"use_int8 is supported only by LongCat-Video-Avatar-1.5\"\n                )\n\n            self.options = {\n                **options,\n                \"attention_backend\": attention_name,\n                \"resolution\": resolution,\n                \"use_distill\": use_distill,\n                \"use_int8\": use_int8,\n                \"max_segments\": require_int(\n                    options.get(\"max_segments\", 8),\n                    \"max_segments\",\n                    minimum=1,\n                    maximum=64,\n                ),\n            }\n\n            self._release_model()","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/python/longcat-video/backend.py#L158-L194","documentation":"ValueError raised at longcat-video load time when use_int8=true but the loaded model classifies as MODEL_KIND_BASE (LongCat-Video base) rather than the Avatar-1.5 variant. INT8 weights only exist for LongCat-Video-Avatar-1.5 (the base_model_int8 subfolder its loader looks for), so requesting int8 on the base model is rejected before download/load.","triggerScenarios":"LoadModel with model=LongCat-Video (base) and options {\"use_int8\": true}; pointing at a base checkpoint while keeping use_int8 from a previous avatar config.","commonSituations":"Copying an avatar model's option block onto the base model to save VRAM; renaming model repos and the kind inference now classifies as base.","solutions":["Remove use_int8 (or set it to false) when loading the base LongCat-Video model","Or switch the model to LongCat-Video-Avatar-1.5 if int8 quantization is required"],"exampleFix":"# before\nmodel: LongCat-Video/Live-LongCat-Video\noptions:\n  use_int8: true\n\n# after\nmodel: LongCat-Video/Live-LongCat-Video\noptions:\n  use_int8: false","handlingStrategy":"validation","validationCode":"def validate_longcat_load_options(model_id: str, options: dict) -> dict:\n    is_avatar = \"avatar\" in model_id.lower()  # mirror of classify_model heuristics\n    if options.get(\"use_int8\") and not is_avatar:\n        options = {k: v for k, v in options.items() if k != \"use_int8\"}\n        # or raise, if silent dropping is undesirable\n    return options","typeGuard":null,"tryCatchPattern":"try:\n    stub.LoadModel(opts)\nexcept grpc.RpcError as e:\n    if \"use_int8\" in (e.details() or \"\"):\n        opts[\"options\"].pop(\"use_int8\", None)\n        stub.LoadModel(opts)\n    else:\n        raise","preventionTips":["Keep per-model option templates so int8 flags travel only with avatar models","Document quantization support per model variant in your deployment configs"],"tags":["python","longcat-video","video-generation","quantization","configuration"],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}