fix: 用 transformers 替代 modelscope 导入,从根源消除副作用
- infer_v2.py: from modelscope → from transformers import AutoModelForCausalLM 模型已在本地,不需要 modelscope 的 hub 下载包装 这样 modelscope 根本不会被 import,消除所有 monkey-patching 副作用 - aiia_vibevoice_nodes.py: 还原 device_map=auto(此文件无需修改)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user