fix model switching bug

This commit is contained in:
billwuhao
2025-05-30 20:12:48 +08:00
parent c0ef20a534
commit 2601a33e58
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -169,6 +169,7 @@ class DiffRhythmRun:
elif torch.backends.mps.is_available():
device = "mps"
self.device = device
self.model_name = None
@classmethod
def INPUT_TYPES(cls):
@@ -224,7 +225,8 @@ class DiffRhythmRun:
max_frames = 6144
global CFM, TOKENIZER, MUQ, VAE, EVAL_MODEL, EVAL_MUQ
if CFM is None:
if CFM is None or self.model_name != model:
self.model_name = model
CFM, TOKENIZER, MUQ, VAE, EVAL_MODEL, EVAL_MUQ = prepare_model(max_frames, self.device, model)
batch_infer_num = 1 if quality_or_speed == "speed" else 5
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "diffrhythm_mw"
description = "Blazingly Fast and Embarrassingly Simple End-to-End Full-Length Song Generation. A node for ComfyUI."
version = "2.2.3"
version = "2.2.4"
license = {file = "LICENSE"}
dependencies = ["# accelerate==1.4.0", "# torchdiffeq==0.2.5", "# torchaudio==2.6.0", "# transformers==4.49.0", "# librosa==0.10.2.post1", "# pyarrow==19.0.1", "# pandas==2.2.3", "# bitsandbytes", "# jieba==0.42.1", "# cn2an==0.5.23", "# pypinyin==0.53.0", "# onnxruntime", "LangSegment", "x-transformers", "pylance", "ema-pytorch", "prefigure", "muq", "mutagen", "pyopenjtalk", "pykakasi", "Unidecode", "phonemizer"]