fix model switching bug

This commit is contained in:
billwuhao
2025-05-30 20:08:42 +08:00
parent 8de1b046b4
commit 9cbd56bf2a
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -214,6 +214,7 @@ MODEL_CACHE = None
class CSMDialogRun:
def __init__(self):
self.device = "cuda" if torch.cuda.is_available() else "cpu"
self.model_name = None
@classmethod
def INPUT_TYPES(s):
@@ -282,7 +283,8 @@ class CSMDialogRun:
):
global MODEL_CACHE
if MODEL_CACHE is None:
if MODEL_CACHE is None or self.model_name != model:
self.model_name = model
csm_1b_path = os.path.join(models_dir, "TTS", "csm-1b")
config_path = os.path.join(csm_1b_path, "config.json")
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "csm_mw"
description = "ComfyUI node of Conversational Speech Model (CSM)."
version = "1.1.1"
version = "1.1.2"
license = {file = "LICENSE"}
[project.urls]