fix model switching bug
This commit is contained in:
+3
-1
@@ -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
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user