{"record":{"id":"a4c106e390e30683","repo":"RVC-Boss/GPT-SoVITS","slug":"path-sovits-sovits-model-version-lor-a4c106","errorCode":null,"errorMessage":"{path_sovits}SoVITS {model_version}底模缺失，无法加载相应 LoRA 权重","messagePattern":"(.+?)SoVITS (.+?)底模缺失，无法加载相应 LoRA 权重","errorType":"exception","errorClass":"FileExistsError","httpStatus":null,"severity":"error","filePath":"GPT_SoVITS/inference_webui_fast.py","lineNumber":244,"sourceCode":"        sovits_path = sovits_path[0]\n\nfrom process_ckpt import get_sovits_version_from_path_fast\n\nv3v4set = {\"v3\", \"v4\"}\n\n\ndef change_sovits_weights(sovits_path, prompt_language=None, text_language=None):\n    if \"！\" in sovits_path or \"!\" in sovits_path:\n        sovits_path = name2sovits_path[sovits_path]\n    global version, model_version, dict_language, if_lora_v3\n    version, model_version, if_lora_v3 = get_sovits_version_from_path_fast(sovits_path)\n    # print(sovits_path,version, model_version, if_lora_v3)\n    is_exist = is_exist_s2gv3 if model_version == \"v3\" else is_exist_s2gv4\n    path_sovits = path_sovits_v3 if model_version == \"v3\" else path_sovits_v4\n    if if_lora_v3 == True and is_exist == False:\n        info = path_sovits + \"SoVITS %s\" % model_version + i18n(\"底模缺失，无法加载相应 LoRA 权重\")\n        gr.Warning(info)\n        raise FileExistsError(info)\n    dict_language = dict_language_v1 if version == \"v1\" else dict_language_v2\n    if prompt_language is not None and text_language is not None:\n        if prompt_language in list(dict_language.keys()):\n            prompt_text_update, prompt_language_update = (\n                {\"__type__\": \"update\"},\n                {\"__type__\": \"update\", \"value\": prompt_language},\n            )\n        else:\n            prompt_text_update = {\"__type__\": \"update\", \"value\": \"\"}\n            prompt_language_update = {\"__type__\": \"update\", \"value\": i18n(\"中文\")}\n        if text_language in list(dict_language.keys()):\n            text_update, text_language_update = {\"__type__\": \"update\"}, {\"__type__\": \"update\", \"value\": text_language}\n        else:\n            text_update = {\"__type__\": \"update\", \"value\": \"\"}\n            text_language_update = {\"__type__\": \"update\", \"value\": i18n(\"中文\")}\n        if model_version in v3v4set:\n            visible_sample_steps = True\n            visible_inp_refs = False","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/RVC-Boss/GPT-SoVITS/blob/d523079fc05d9a8028d6085bffe4a2757c32abb6/GPT_SoVITS/inference_webui_fast.py#L226-L262","documentation":"Same guard as inference_webui.py:273 but in the fast webui variant. change_sovits_weights() detects the selected checkpoint is a v3/v4 LoRA (if_lora_v3 True) and the corresponding base model presence flag (is_exist_s2gv3/is_exist_s2gv4) is False, so it warns via gr.Warning and raises FileExistsError listing the missing base-model path. LoRA checkpoints are deltas and cannot be loaded without the pretrained base.","triggerScenarios":"In inference_webui_fast.py, changing the sovits weights dropdown to a v3/v4 LoRA .pth when the s2Gv3/s2Dv3 or s2Gv4/s2Dv4 base files are absent from the expected pretrained_models paths.","commonSituations":"Fast webui used on a machine where only v2 pretrained models were downloaded; LoRA checkpoint distributed without instructions to fetch base models; pretrained folder relocated/renamed.","solutions":["Download the pretrained bundle including v3/v4 base sovits models into GPT_SoVITS/pretrained_models/.","Verify the paths behind path_sovits_v3/path_sovits_v4 exist; fix the constants if you moved the folder.","Use a full (merged) v1/v2 checkpoint instead of the LoRA if you cannot obtain base models.","Maintainers: align exception type with the condition (FileNotFoundError, not FileExistsError)."],"exampleFix":"# before\n# fast webui: FileExistsError: .../s2Gv4.pth SoVITS v4 底模缺失，无法加载相应 LoRA 权重\n\n# after\n# wget pretrained bundle; confirm files, then reselect checkpoint in dropdown\n# ls GPT_SoVITS/pretrained_models/s2Gv4.pth GPT_SoVITS/pretrained_models/s2Dv4.pth","handlingStrategy":"validation","validationCode":"import os\n# before letting the UI change weights, check lora/base availability\n_, model_version, if_lora = get_sovits_version_from_path_fast(sovits_path)\nif if_lora:\n    base = path_sovits_v3 if model_version == \"v3\" else path_sovits_v4\n    if not os.path.exists(base):\n        gr.Warning(f\"缺少底模 {base}，请先下载\")\n        return keep_current()","typeGuard":null,"tryCatchPattern":"try:\n    change_sovits_weights(p)\nexcept FileExistsError as e:\n    gr.Warning(str(e))  # base model missing — instruct download, keep old model","preventionTips":["Ship or fetch the full pretrained set when deploying the fast webui.","Verify v3/v4 base files exist before enabling LoRA checkpoints in the dropdown.","Remember FileExistsError here actually signals a missing file."],"tags":["model-weights","lora","sovits","webui-fast","missing-file"],"backgroundTag":null,"analyzedSha":"d523079fc05d9a8028d6085bffe4a2757c32abb6","analyzedAt":"2026-08-15T01:06:46.402Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}