屏蔽lora strict=False的print假告警,其实加载逻辑没问题。

屏蔽lora strict=False的print假告警,其实加载逻辑没问题。
This commit is contained in:
RVC-Boss 2025-02-27 14:38:55 +08:00 committed by GitHub
parent db811b7cc8
commit 00cbadcaad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -288,7 +288,8 @@ def change_sovits_weights(sovits_path,prompt_language=None,text_language=None):
init_lora_weights=True, init_lora_weights=True,
) )
vq_model.cfm = get_peft_model(vq_model.cfm, lora_config) vq_model.cfm = get_peft_model(vq_model.cfm, lora_config)
print("loading sovits_v3_lora%s"%(lora_rank),vq_model.load_state_dict(dict_s2["weight"], strict=False)) print("loading sovits_v3_lora%s"%(lora_rank))
vq_model.load_state_dict(dict_s2["weight"], strict=False)##
vq_model.cfm = vq_model.cfm.merge_and_unload() vq_model.cfm = vq_model.cfm.merge_and_unload()
# torch.save(vq_model.state_dict(),"merge_win.pth") # torch.save(vq_model.state_dict(),"merge_win.pth")
vq_model.eval() vq_model.eval()