Commit Graph
1 Commits
Author SHA1 Message Date
debpalash 672ac2b1f5 fix(clone): refuse a CPU reference encode that cannot fit instead of crashing
A CPU-only 8 GB Windows host died with an access violation inside the DAC
encoder while preparing a voice-clone prompt (#3340).

- Check free RAM plus swap against the measured encode cost before a CPU
  encode, and raise a MemoryError subclass with an actionable message.
- Run the tokenizer encode in inference mode; the clone-prompt cache calls
  it outside generate(), so autograd kept every activation (+27% peak).
- Treat a host-RAM failure in the prompt precompute like a GPU OOM: raise
  instead of repeating the same encode through the inline path.
- is_host_oom recognizes MemoryError subclasses.
2026-10-25 21:40:51 +05:30