Files
Eutectico-ComfyUI-MOSS-TTS/lib
Federico Volovnik-Jose 0fc61d561d fix(loader): cheap repr for MOSS_TTS_MODEL to avoid cascading OOM in error path
When generation fails (e.g. OOM), ComfyUI's execution.format_value calls
repr() on the workflow input dict. Default dict.__repr__ recursively reprs
the contained Processor, whose __repr__ calls to_dict() which deepcopies
every nested submodule — including the audio_tokenizer's full GPU weights.
That deepcopy triggers a second OOM during error formatting, swamps the
trace with copy.deepcopy frames, and masks the original error.

Wrap the model handle in a dict subclass with a tiny __repr__ that just
shows device / dtype / attn / model_id and never touches the heavy
contents. All existing entry['key'] / entry.get(...) access patterns are
preserved.
2026-04-27 13:11:58 +02:00
..
2026-04-25 11:13:38 +02:00