Nodes/MOSS-TTS 1.5/MOSS-TTS Save Tokens
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.

By eehrich·Created 3 months ago·Updated about 9 hours ago· 2
MOSS-TTS Save Tokens
  • tokens
  • path
◄filename_prefixmoss_tokens/voice►
CategoryMOSS TTS 1.5

Inputs (2)

NameTypeDefaultDescription
tokensMOSS_TOKENSCodes to persist, e.g. from MOSS-TTS Encode Tokens or a 'tokens' output.
filename_prefixSTRINGmoss_tokens/voicePath 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)

NameTypeDescription
pathSTRINGAbsolute 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.