Files
Eutectico-ComfyUI-MOSS-TTS/lib
Federico Volovnik-JoseandClaude Opus 4.7 86f24e44db fix(loader): cast audio_tokenizer inputs to param dtype via forward hook
After casting the audio_tokenizer's weights to fp16/bf16 (saves ~3 GB
VRAM), incoming fp32 wav tensors hit Linear/Conv layers with fp16
weights and crash with "expected scalar type Float but found Half" deep
inside encode_audios_from_wav.

Register a forward-pre-hook on every leaf-ish module of the
audio_tokenizer that casts floating-point input tensors to the module's
parameter dtype on the fly. Covers both the encode (voice reference)
and decode paths without needing to enumerate the model's submodule
names.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 12:12:28 +02:00
..
2026-04-25 11:13:38 +02:00