`chatterbox_node.py` did `torch.load = patched_torch_load` at import time,
which replaces torch.load for the entire Python process — ComfyUI core and
every other custom node pack included.
Two problems in a shared environment (and on multi-tenant cloud runtimes
where one process serves many users' jobs back to back):
1. Cross-pack clobbering. Other packs also wrap `torch.load`. Whichever
imports last wins, so process-wide torch.load behavior depends on
custom-node import order, which is not deterministic.
2. Behavior imposed on unrelated callers. After import, every `torch.load`
in the process gets `map_location` forced onto it — including ComfyUI
core's checkpoint loading and other packs that explicitly wanted default
device placement.
Fix: keep `patched_torch_load` exactly as-is, but install it only for the
duration of this pack's own Chatterbox model loads via a
`default_map_location()` context manager, restoring the previous torch.load
in `finally`. All four `Chatterbox*.from_local(...)` call sites are wrapped,
so device defaulting still works for every Chatterbox load; torch.load is
left untouched for everyone else.
No functional change to how this pack loads models; only the blast radius of
the patch is reduced from process-global to call-scoped.
The VC model loader was downloading incorrect model files (s3gen.safetensors)
when the ChatterboxVC.from_local() expects s3gen.pt format.
This caused the model to fail silently, resulting in empty/silent audio output.
Fixes#47
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes#45 - FL Chatterbox Turbo returns error (meanflow parameter)
Fixes#44 - Multilingual TTS min_p parameter compatibility
Changes:
- Add meanflow support to S3Gen for Turbo model (s3gen.py, flow.py, flow_matching.py, decoder.py)
- Add n_cfm_timesteps, noised_mels, speech_token_lens parameters throughout inference chain
- Add basic_euler solver for meanflow mode in flow_matching.py
- Add min_p parameter support to T3.inference() for Multilingual TTS (t3.py)
- Add MinPLogitsWarper for min_p sampling
- Fix Float vs Double type errors (librosa returns float64, PyTorch expects float32)
- Fix int vs float type errors in mask.py and flow.py
- Add save_audio_wav() helper with fallbacks for robust audio saving
- Add intmeanflow time mixer and configs for meanflow support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>