ComfyUI Node
MOSS-TTS Save Tokens
Writes MOSS_TOKENS to a file in ComfyUI's output directory and returns the absolute path. Format: torch.save of a dict {format, format_version, audio_codes [frames, n_vq], frames, n_vq, frames_per_second}, saved with a '.moss_tokens.pt' suffix and loadable with weights_only=True (plain tensors only -- no pickled code). Use it to encode a voice reference once and reuse it across runs and across processes: an HTTP-driven pipeline saves the base voice one time, then every later prompt just points MOSS-TTS Load Tokens at the file. The path is also reported in the node's UI output, so it can be read back from ComfyUI's /history response.
MOSS-TTS Save Tokens
- tokens
- path
◄filename_prefixmoss_tokens/voice►
CategoryMOSS TTS 1.5
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| tokens | MOSS_TOKENS | Codes to persist, e.g. from MOSS-TTS Encode Tokens or a 'tokens' output. | |
| filename_prefix | STRING | moss_tokens/voice | Path prefix inside ComfyUI's output directory. Subfolders are created automatically and a counter plus '.moss_tokens.pt' is appended, e.g. 'moss_tokens/voice' -> 'output/moss_tokens/voice_00001_.moss_tokens.pt'. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| path | STRING | Absolute path of the written file. Feed it into MOSS-TTS Load Tokens (in this or a later run) or read it from ComfyUI's /history output. |