284d50b44ca4875bdb668b1d1db70be33692bb9e
- Use relative imports across nodes/ and lib/ so ComfyUI's loader resolves the local subpackages instead of colliding with ComfyUI's own top-level nodes module. - tts_output_to_audio_dict now returns CPU tensors so downstream nodes don't see CUDA tensors. - model_state cache key uses resolved dtype string, so dtype=auto and the matching explicit choice share one cache slot (no spurious 13 GB reload). - Add cleanup_one(key) helper as called for in spec section 4. - Fix pyproject Homepage URL to point at this repo.
ComfyUI-MOSS-TTS
ComfyUI custom nodes for MOSS-TTS — a 1.7B parameter zero-shot text-to-speech and voice-cloning model.
Installation
- Clone this repo into
ComfyUI/custom_nodes/:cd ComfyUI/custom_nodes git clone https://github.com/Eutectico/ComfyUI-MOSS-TTS.git - Install Python dependencies (ComfyUI does this automatically on next start, or you can run it manually):
pip install -r ComfyUI-MOSS-TTS/requirements.txt - Restart ComfyUI. The nodes appear under the
MOSS-TTS/category in the node menu.
The first generation downloads ~13 GB of model weights from HuggingFace. Subsequent runs use the cached weights.
Nodes
| Node | Category | Purpose |
|---|---|---|
MOSS-TTS Loader |
MOSS-TTS/loaders |
Loads the model + processor, holds them in a module-level cache. |
MOSS-TTS Voice Reference |
MOSS-TTS/voice |
Wraps an AUDIO input or filesystem path into a voice-reference container. |
MOSS-TTS Generate |
MOSS-TTS/generation |
Generates speech from text (with optional voice reference). |
MOSS-TTS Unload |
MOSS-TTS/utility |
Frees the model from VRAM. Optional; place at the end of a workflow if needed. |
Quality Presets
The Generate node has a preset dropdown:
| Preset | RVQ Layers | Notes |
|---|---|---|
Custom |
from widgets | Uses the individual sampling sliders as-is. |
Fast (8 RVQ) |
8 | Longest audio on T4 (~12 min); lower quality. |
Balanced (16 RVQ) |
16 | Default. ~8 min on T4. |
High Quality (24 RVQ) |
24 | ~5 min on T4. |
Maximum (32 RVQ) |
32 | Best quality, ~4 min on T4. |
When preset is anything other than Custom, the preset's values override the individual sampling widgets at execution time.
Hardware
Defaults target T4-class GPUs (~16 GB VRAM, FP16, sdpa attention). If you have ≥24 GB VRAM, you may want to set dtype=bf16 and increase max_tokens.
Smoke test
- Drop in a
MOSS-TTS Loadernode (defaults are fine). - Drop in a
MOSS-TTS Generatenode, connectmodeland type any text. - Connect
audiotoSave Audio(built-in). - Run. First run downloads weights (~5–8 min); subsequent runs are fast.
Voice cloning
Connect a Load Audio node → MOSS-TTS Voice Reference → MOSS-TTS Generate.voice. A 5–15 second clean reference clip works well.
Credits
- Model: MOSS-TTS by OpenMOSS Team
- Source notebook: AIQUEST (
MOSS_TTS_Voice_Cloning.ipynb) - ComfyUI integration: this repo
License
MIT — see LICENSE.
Languages
Python
100%