10 Commits
Author SHA1 Message Date
filliptm 596850bc61 Refine scoped ChatterBox torch load wrapper 2026-06-22 14:24:44 -05:00
Deep Mehta fe7b835f76 fix: scope the torch.load map_location wrapper instead of replacing it globally
`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.
2026-05-21 16:28:48 -07:00
FillandClaude Opus 4.5 fa5dc508d3 Fix VC node outputting silent audio
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>
2026-01-18 21:16:29 -08:00
FillandClaude Opus 4.5 2f72aca98e Fix Turbo TTS and Multilingual TTS compatibility issues
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>
2025-12-31 17:19:17 -08:00
Fill 3f3f6842c0 import fix 2025-12-30 16:10:42 -08:00
filliptm a180b56aca added turbo + multilingual + more downloading to models folder in comfy + other enhancements 2025-12-28 14:58:29 -05:00
Fill 694d5580a4 added seed function 2025-06-24 13:17:47 -05:00
Fill 8189590f20 switched to local inference code, ditched package 2025-05-31 10:09:40 +09:00
Fill 5b0ccd9f80 added mac support + keep model loaded 2025-05-31 09:01:09 +09:00
Fill c8f00dc856 first 2025-05-29 21:54:50 +09:00