From e27987cad63af5e38c5121849c331d1cbfbcef3a Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Mon, 16 Feb 2026 11:49:50 +0800 Subject: [PATCH] fix: add llm.base.pt fallback for V3 model switching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LLM model switch logic only knew about llm.orig.pt as non-RL fallback. V3 models (Fun-CosyVoice3-0.5B-2512) ship with llm.base.pt instead of llm.orig.pt. When use_rl_model=False, the code silently skipped the switch because llm.orig.pt didn't exist, keeping llm.rl.pt active. llm.rl.pt is incompatible with seed fallback audio, causing the max_trials sampling crash. Now fallback order: llm.orig.pt → llm.base.pt → no-op --- aiia_cosyvoice_nodes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aiia_cosyvoice_nodes.py b/aiia_cosyvoice_nodes.py index 18a81a8..cdb5849 100755 --- a/aiia_cosyvoice_nodes.py +++ b/aiia_cosyvoice_nodes.py @@ -218,10 +218,14 @@ class AIIA_CosyVoice_ModelLoader: print(f"[AIIA] Loader Debug: use_rl_model_raw={use_rl_model} (type: {type(use_rl_model)}) -> effective_rl={is_rl_requested}") print(f"[AIIA] Loader Debug: llm_rl exists: {os.path.exists(llm_rl)}") - target_source = llm_rl if is_rl_requested and os.path.exists(llm_rl) else llm_orig + llm_base = os.path.join(model_dir, "llm.base.pt") + + # Determine the non-RL fallback: prefer llm.orig.pt, then llm.base.pt + non_rl_target = llm_orig if os.path.exists(llm_orig) else (llm_base if os.path.exists(llm_base) else None) + target_source = llm_rl if is_rl_requested and os.path.exists(llm_rl) else non_rl_target # 3. Aggressively Manage Symlink - if os.path.exists(target_source): + if target_source and os.path.exists(target_source): target_basename = os.path.basename(target_source) current_target = None