From d76d2712e60cf6629c87625cf00ccbde13d40ffd Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Mon, 29 Dec 2025 15:45:16 +0800 Subject: [PATCH] Fix VibeVoice load path cleanup bug & update README file structure --- README.md | 3 ++- aiia_vibevoice_nodes.py | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f1562fb..27a559c 100644 --- a/README.md +++ b/README.md @@ -443,7 +443,6 @@ git clone https://github.com/havvk/ComfyUI_AIIA.git ComfyUI/models/vibevoice/microsoft/VibeVoice-1.5B/ ├── model-00001-of-00003.safetensors ... (模型权重) ├── config.json - ├── modeling_vibevoice_*.py (Python代码) └── [Tokenizer Files] (必须包含以下 Qwen 文件!) ├── tokenizer.json ├── tokenizer_config.json @@ -451,6 +450,8 @@ git clone https://github.com/havvk/ComfyUI_AIIA.git └── merges.txt ``` + **💡 说明**: 插件已内置并修复了所有 VibeVoice 的 Python 核心代码 (`vibevoice_core`)。你**不需要**也不建议在模型目录中保留 `modeling_vibevoice_*.py` 等 Python 脚本,以避免潜在的冲突。 + **⚠️ 重要提示**: VibeVoice 依赖 **Qwen2.5-1.5B** 的分词器。如果你下载的模型包里没有上面列出的 tokenizer 文件,请手动从 [Qwen/Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B/tree/main) 下载这 4 个文件并放入模型目录。 **手动下载命令**: diff --git a/aiia_vibevoice_nodes.py b/aiia_vibevoice_nodes.py index 45efb17..4b7fe50 100644 --- a/aiia_vibevoice_nodes.py +++ b/aiia_vibevoice_nodes.py @@ -245,13 +245,15 @@ class AIIA_VibeVoice_Loader: trust_remote_code=False ) - if sys_path_added: - sys.path.remove(load_path) + # Cleanup not needed as we didn't add load_path to sys.path + # if sys_path_added: + # sys.path.remove(core_path) # We keep core_path for now to ensure sub-modules resolve + pass except Exception as e: print(f"[AIIA] Manual import/registration failed: {e}") - if 'sys_path_added' in locals() and sys_path_added: - sys.path.remove(load_path) + # if 'sys_path_added' in locals() and sys_path_added: + # sys.path.remove(load_path) raise e # 7. Load Tokenizer & Processor