Commit Graph
19 Commits
Author SHA1 Message Date
diodiogod 3e2c07d6ec Fix Windows socket cleanup errors in background thread
- Add socket import for proper resource handling
- Force garbage collection on thread exit to clean up resources
- Wrap thread exit in finally block to ensure cleanup happens
- Fixes ConnectionResetError exceptions on Windows when background refresh finishes
2025-10-31 00:07:42 -03:00
diodiogod 319e16f8ca Version 4.11.20
Add TTS Audio Suite prefix to post-load diagnostic messages

User-facing improvements:
- Prefix character voice discovery messages with [TTS Audio Suite] for clarity
- Helps users identify which extension is responsible for each message
- Distinguishes TTS Suite messages from other custom nodes during startup
2025-10-23 23:42:48 -03:00
diodiogod daf54de61d Version 4.11.19
Optimize startup performance with lazy loading and async checks

Engine node optimizations:
- Replace heavy engine imports in INPUT_TYPES with file-reading-only model discovery
- Remove blocking module loads from node initialization
- Reconstruct discovery logic for all 7 engine nodes: VibeVoice, F5-TTS, Higgs, ChatterBox, ChatterBox 23-Lang, IndexTTS, RVC
- Each engine now scans model folders without importing engine modules

Voice discovery and dependency improvements:
- Implement persistent voice character discovery cache in .cache folder
- Add background refresh thread for cache updates
- Move dependency checking to async background thread (2-second delay)
- Prevent blocking initialization on startup
- Print diagnostic messages after ComfyUI loads
2025-10-23 23:34:35 -03:00
diodiogod 59188909c3 Version 4.10.6
Fix voice discovery extra_model_paths.yaml integration

Technical details:
- Fix path comparison logic in voice discovery system preventing extra_model_paths voice directories from being scanned
- Add proper path normalization using os.path.normpath() for accurate duplicate detection
- Apply fix to all voice discovery functions: main scanning, character discovery, and alias loading
- Maintain backward compatibility with existing voice directory structure
2025-09-23 22:10:54 -03:00
diodiogod d1974c511f Version 4.8.34
Implement ComfyUI extra_model_paths.yaml support

Technical implementation:
- Add TtsExtraPathsManager for shared model directory integration
- Update unified downloader to respect configured model paths
- Enhance voice discovery with multi-path fallback support
- Integrate model manager with extra_model_paths.yaml system
- Support shared storage across multiple ComfyUI installations
- Maintain backward compatibility with existing setups
- Reference: GitHub issue #63
2025-09-10 13:06:22 -03:00
diodiogod 9ad7c78893 Add extra_model_paths.yaml support and enhance voice discovery
Technical implementation:
- Add TtsExtraPathsManager for ComfyUI extra_model_paths.yaml integration
- Support shared model directories across multiple ComfyUI installations
- Implement intelligent model discovery across configured paths
- Add voice discovery fallback: models/voices → models/TTS/voices → examples
- Update character alias map loading with proper priority system
- Enhance voice directory scanning to include TTS organization structure
- Add changelog guidelines requiring engine names in titles
- Reference: GitHub issue #63
2025-09-10 12:12:32 -03:00
diodiogod 3691df5bfd Version 4.8.28
Fix VibeVoice character voice discovery and quantization support

Technical details:
- Fix voice discovery using wrong engine type for VibeVoice
- Add bitsandbytes dependency for 4-bit quantization support
- Improve voice reference debug output for better troubleshooting
- Fix misleading completion messages in character switching mode
- Standardize voice discovery engine types (audio_only vs audio_and_text)
2025-09-09 11:03:05 -03:00
diodiogod 865940b47f Implement Italian ChatterBox prefix system and debug console output
- Updated character parser regex to exclude standalone [it]/[italian] tags while preserving [it:]/[italian:] syntax
- Added apply_italian_prefix_if_needed() method for automatic [it] prefix application when Italian language is detected
- Extended character parser with split_by_character_with_language_and_explicit_flag() to preserve explicit language flags
- Updated ChatterBox TTS and SRT nodes to use new parser method with automatic Italian prefix handling
- Fixed timing report text to show processed segments instead of raw input with character tags
- Added console debug prints to show final text sent to TTS models for verification

Italian ChatterBox model now correctly receives [it] prefix for Italian text when:
- User explicitly uses [it:Alice] or [italian:Bob] character syntax
- User uses [it:] or [italian:] language switching syntax
- Character is mapped to Italian in alias system
- Does NOT apply prefix when just using Italian model globally (preserves bilingual capability)
2025-09-04 02:01:13 -03:00
diodiogod 72d05fcf80 Fix pause tag caching: enable internal cache for pause segments
When text contains pause tags, use internal pause processor caching which
caches individual text segments separately from pause timing. This ensures
changing pause duration doesn't invalidate cache for text content.

- Detect pause tags in multilingual engine and enable pause processing
- Route pause tag segments to internal caching in adapter
- Route non-pause segments to external caching as before
2025-08-12 20:12:14 -03:00
diodiogod 2ea967e92f Fix model instance switching: ensure self.tts_model points to correct cached model
When multilingual engine detected a model was 'already loaded', it only updated
state variables but didn't switch self.tts_model to the correct cached model
instance. This caused German text to be generated with English model despite
logs showing German model was active.

Fixed by calling load_tts_model which will reuse cached model but properly
set self.tts_model to the correct language model instance.
2025-08-12 19:41:39 -03:00
diodiogod 8ce396ce8e Fix multilingual model switching: ensure adapter uses correct loaded model
The multilingual engine was loading the correct language model (e.g. German for [de:] tags)
but the adapter was still receiving the original default model language (English) in
parameters, causing German text to be generated with English model.

Fixed by updating current_language in params to match the actual loaded model before
calling the adapter, ensuring language tags use the correct model.
2025-08-12 18:52:58 -03:00
diodiogod 6df656e702 Fix cache character parameter for language-only tags
Language-only tags like [de:] were still using resolved character alias
'david_attenborough cc3' instead of 'narrator' for cache keys. Fixed by
passing 'narrator' as character parameter to engine adapter when
original_character was 'narrator' (language-only tag).
2025-08-12 18:33:20 -03:00
diodiogod d126c91d05 Fix critical ChatterBox multilingual tokenization regression
MAJOR FIXES:
- Fix character alias system overriding user voice selection for language-only tags
- Fix multilingual engine loading wrong tokenizer (English) for all languages
- Fix subtitle processing using wrong model after multilingual segment processing
- Preserve original character info to detect language-only tags vs explicit character tags

TECHNICAL DETAILS:
- Add original_character field to CharacterSegment to track pre-alias resolution names
- Fix multilingual engine to load correct language model first (not default English)
- Add model restoration logic after multilingual processing in traditional SRT
- Improve voice selection messages to show when using main voice vs character voice
- Fix cache coverage method to handle new 5-tuple segment data format

This resolves the regression where German/Norwegian segments sounded English
despite logs showing correct models loading. The issue was the multilingual engine
loading English tokenizer first, then caching it for all subsequent languages.
2025-08-10 21:25:37 -03:00
diodiogod 16d2ab6bf1 Fix model state communication and narrator voice priority
- Add current_model_name to Traditional SRT for multilingual engine compatibility
- Prioritize main narrator voice over character aliases for language-only tags
- Multilingual engine now detects already loaded models to prevent duplicates
2025-08-10 12:58:53 -03:00
diodiogod 6e6a9e4ed6 Fix streaming parallelization and voice mapping issues
- Implement proper streaming model pre-loading with StreamingModelManager
- Fix character alias resolution in voice discovery system
- Add crash protection to streaming workers
- Fix TTS model loading in traditional mode
- Simplify unified UI by removing confusing batch processing toggles
- Ensure voice_refs maps both original and resolved character names
- Add centralized language mapping for streaming multilingual support

Streaming now works correctly with proper voice assignments and language switching.
2025-08-09 23:15:21 -03:00
diodiogod 8383403271 Optimize cache-aware model loading to skip unnecessary model loads when all segments are cached
- Add comprehensive cache checking before model loading decisions
- Skip model loading entirely when all language group segments are cached
- Use consistent model names in cache keys for reliable cache hits
- Track cache status properly across segment processing
- Implement early cache detection to prevent redundant model loading
- Make cached runs nearly instant by eliminating model loading overhead
2025-08-07 09:20:33 -03:00
diodiogod a440cd05b0 Fix model loading efficiency and language mapping issues
- Implement generic local-first fallback utility for all TTS engines
- Fix ChatterBox and F5-TTS duplicate model loading during language fallback
- Add F5-TTS language grouping to load models once per language group
- Fix pt-br language mapping support in language mapper
- Add model tracking to prevent redundant loading in multilingual engine
- Optimize SRT nodes to use unified language-grouped processing

This ensures efficient model loading with proper local model reuse,
eliminating unnecessary downloads and duplicate model loading for
low-VRAM scenarios while maintaining full language support.
2025-08-06 23:01:20 -03:00
diodiogod d67c48aeec Implement proper cache coverage analysis in multilingual engine
- Fix multilingual engine to check if segments are actually cached before loading models
- Replace stubbed _analyze_cache_coverage with real cache checking logic
- Skip model loading entirely when all segments in language group are cached
- Prevents unnecessary model reloading when only timing parameters change
- Should dramatically improve performance for cached SRT generations
- Addresses issue where models loaded even when audio was cached
2025-08-06 19:00:46 -03:00
diodiogod b21d0212fb Major refactoring: Reorganize project structure for better maintainability
🔧 ENGINES SEPARATION:
- Move chatterbox/ → engines/chatterbox/ (TTS/VC engine + models)
- Move chatterbox/f5tts/ → engines/f5tts/ (F5-TTS engine)
- Move adapters/ → engines/adapters/ (engine adapters for multilingual system)

📁 NODES ORGANIZATION:
- Create nodes/chatterbox/ for ChatterBox nodes (TTS, VC, SRT)
- Create nodes/f5tts/ for F5-TTS nodes (TTS, SRT, Edit, Options)
- Create nodes/audio/ for audio processing nodes (analyzer, recorder)
- Create nodes/base/ for base classes
- Rename node files for clarity (tts_node.py → chatterbox_tts_node.py)

🗂️ UTILITIES RESTRUCTURE:
- Replace core/ with organized utils/ structure
- utils/audio/ - Audio processing, analysis, caching
- utils/text/ - Text processing, character parsing, chunking
- utils/voice/ - Voice discovery, multilingual engine
- utils/timing/ - SRT timing logic (from chatterbox_srt/)
- utils/models/ - Model management (ChatterBox + F5-TTS)
- utils/system/ - System utilities, import management

🔄 IMPORT PATH UPDATES:
- Update all import paths to use new organized structure
- Fix lazy imports in nodes for runtime compatibility
- Restore missing F5-TTS edit engine from git history
- Fix path resolution for voice discovery and character aliases

🎯 KEY IMPROVEMENTS:
- Engine-centric organization with clear separation
- Purpose-driven folder grouping for better navigation
- Self-documenting file names indicating ownership
- Scalable structure for future engine additions
- Maintains backward compatibility for existing workflows

All 10 nodes loading successfully with complete functionality preserved.
2025-08-02 18:50:26 -03:00