From f7e96d37cec170e6d28751f9193e8a41f03aa34d Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Thu, 19 Feb 2026 12:51:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=20transformers=20=E6=9B=BF?= =?UTF-8?q?=E4=BB=A3=20modelscope=20=E5=AF=BC=E5=85=A5=EF=BC=8C=E4=BB=8E?= =?UTF-8?q?=E6=A0=B9=E6=BA=90=E6=B6=88=E9=99=A4=E5=89=AF=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - infer_v2.py: from modelscope → from transformers import AutoModelForCausalLM 模型已在本地,不需要 modelscope 的 hub 下载包装 这样 modelscope 根本不会被 import,消除所有 monkey-patching 副作用 - aiia_vibevoice_nodes.py: 还原 device_map=auto(此文件无需修改) --- aiia_vibevoice_nodes.py | 2 +- libs/index-tts/indextts/infer_v2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aiia_vibevoice_nodes.py b/aiia_vibevoice_nodes.py index 7549dd8..823ed69 100755 --- a/aiia_vibevoice_nodes.py +++ b/aiia_vibevoice_nodes.py @@ -146,7 +146,7 @@ class AIIA_VibeVoice_Loader: # 5. Load Model print(f"[AIIA] Loading VibeVoice model variant: {VibeVoiceClass.__name__}") config = VibeVoiceConfig.from_pretrained(load_path) - model = VibeVoiceClass.from_pretrained(load_path, config=config, torch_dtype=dtype, trust_remote_code=False).to(device) + model = VibeVoiceClass.from_pretrained(load_path, config=config, torch_dtype=dtype, device_map="auto", trust_remote_code=False) # Load Generation Config try: diff --git a/libs/index-tts/indextts/infer_v2.py b/libs/index-tts/indextts/infer_v2.py index 77caab0..fc17b70 100644 --- a/libs/index-tts/indextts/infer_v2.py +++ b/libs/index-tts/indextts/infer_v2.py @@ -28,7 +28,7 @@ from indextts.s2mel.modules.campplus.DTDNN import CAMPPlus from indextts.s2mel.modules.audio import mel_spectrogram from transformers import AutoTokenizer -from modelscope import AutoModelForCausalLM +from transformers import AutoModelForCausalLM from huggingface_hub import hf_hub_download import safetensors from transformers import SeamlessM4TFeatureExtractor