diff --git a/chatterbox_node.py b/chatterbox_node.py index 88031a2..2f07a3f 100644 --- a/chatterbox_node.py +++ b/chatterbox_node.py @@ -48,6 +48,7 @@ class FL_ChatterboxTTSNode(AudioNodeBase): """ _tts_model = None _tts_device = None + _tts_conds = None @classmethod def INPUT_TYPES(cls): @@ -146,6 +147,7 @@ def generate_speech(self, text, exaggeration, cfg_weight, temperature, seed, aud # Load the TTS model or reuse if loaded and device matches if FL_ChatterboxTTSNode._tts_model is not None and FL_ChatterboxTTSNode._tts_device == device: tts_model = FL_ChatterboxTTSNode._tts_model + tts_model.conds = FL_ChatterboxTTSNode._tts_conds message += f"\nReusing loaded TTS model on {device}..." else: if FL_ChatterboxTTSNode._tts_model is not None: @@ -161,6 +163,7 @@ def generate_speech(self, text, exaggeration, cfg_weight, temperature, seed, aud message += f"\nLoading TTS model on {device}..." pbar.update_absolute(10) # Indicate model loading started tts_model = ChatterboxTTS.from_pretrained(device=device) + FL_ChatterboxTTSNode._tts_conds = tts_model.conds pbar.update_absolute(50) # Indicate model loading finished if keep_model_loaded: