{"record":{"id":"664061227f097ad6","repo":"OpenBMB/VoxCPM","slug":"unsupported-architecture-arch","errorCode":null,"errorMessage":"Unsupported architecture: {arch}","messagePattern":"Unsupported architecture: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/voxcpm/core.py","lineNumber":83,"sourceCode":"\n        if arch == \"voxcpm2\":\n            self.tts_model = VoxCPM2Model.from_local(\n                voxcpm_model_path,\n                optimize=optimize,\n                device=device,\n                lora_config=lora_config,\n            )\n            print(\"Loaded VoxCPM2Model\", file=sys.stderr)\n        elif arch == \"voxcpm\":\n            self.tts_model = VoxCPMModel.from_local(\n                voxcpm_model_path,\n                optimize=optimize,\n                device=device,\n                lora_config=lora_config,\n            )\n            print(\"Loaded VoxCPMModel\", file=sys.stderr)\n        else:\n            raise ValueError(f\"Unsupported architecture: {arch}\")\n\n        # Load LoRA weights if path is provided\n        if lora_weights_path is not None:\n            print(f\"Loading LoRA weights from: {lora_weights_path}\", file=sys.stderr)\n            loaded_keys, skipped_keys = self.tts_model.load_lora_weights(lora_weights_path)\n            print(f\"Loaded {len(loaded_keys)} LoRA parameters, skipped {len(skipped_keys)}\", file=sys.stderr)\n\n        self.text_normalizer = None\n        self.denoiser = None\n        if enable_denoiser and zipenhancer_model_path is not None:\n            from .zipenhancer import ZipEnhancer\n\n            self.denoiser = ZipEnhancer(zipenhancer_model_path)\n        else:\n            self.denoiser = None\n        if optimize:\n            print(\"Warm up VoxCPMModel...\", file=sys.stderr)\n            self.tts_model.generate(","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/OpenBMB/VoxCPM/blob/f5a1c6a6b901bc732e20f0d59a369f6829ad717a/src/voxcpm/core.py#L65-L101","documentation":"VoxCPM.__init__ dispatches on an architecture string and only recognizes specific values (v1 VoxCPMModel / v2 VoxCPM2Model branches). Any other arch string reaches the else branch and raises ValueError.","triggerScenarios":"Instantiating the wrapper with arch='v3', a typo like 'V2' or 'v1x', or an arch value introduced in a newer version than the installed package supports.","commonSituations":"Upgrading config files or checkpoints from a newer VoxCPM release, case mismatches, or hand-editing model configs.","solutions":["Check the accepted arch values in core.py above the raise and use one of them","Upgrade voxcpm if the arch is from a newer release","Fix case/typo in the arch string"],"exampleFix":"# before\nmodel = VoxCPM(arch=\"V2\", ...)\n# after\nmodel = VoxCPM(arch=\"v2\", ...)","handlingStrategy":"validation","validationCode":"SUPPORTED_ARCH = {\"v1\", \"v2\"}  # verify against core.py\nif arch not in SUPPORTED_ARCH:\n    raise ValueError(f\"unsupported arch {arch}; pick from {SUPPORTED_ARCH}\")","typeGuard":"def is_supported_arch(a: str) -> bool:\n    return a in {\"v1\", \"v2\"}","tryCatchPattern":"try:\n    VoxCPM(arch=arch, ...)\nexcept ValueError as e:\n    if 'Unsupported architecture' in str(e): raise ConfigError(arch) from e\n    raise","preventionTips":["Pin the voxcpm version your configs were written for","Centralize arch constants instead of hardcoding strings"],"tags":["model-config","architecture","value-error"],"backgroundTag":"unsupported-enum-value","analyzedSha":"f5a1c6a6b901bc732e20f0d59a369f6829ad717a","analyzedAt":"2026-08-27T05:54:30.617Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}