Commit Graph
1226 Commits
Author SHA1 Message Date
diodiogod e840c6df4d Version 4.19.2
Add configurable VC engine for <restore> tags

Technical implementation:
- Add ComfyUI settings menu option for VC engine selection
- Support three VC engines: ChatterBox 23-Lang, ChatterBox, CosyVoice
- Fix module import to use shared sys.modules instance
- Implement file-based settings cache for persistence across restarts
- Add beforeQueuing hook to ensure settings sync before workflows
2026-01-28 12:18:54 -03:00
diodiogod b13ec81872 Version 4.19.1
Add CosyVoice3 <restore> tag support

Technical implementation:
- Add extract_restore_tags_only() function to filter only restore tags
- Integrate EditPostProcessor into CosyVoice processor
- Preserve CosyVoice native paralinguistic tags (<breath>, <laughter>, etc.)
- Apply ChatterBox VC restoration after TTS generation
- Block Step Audio EditX emotion/style/speed/paralinguistic tags
2026-01-28 11:43:23 -03:00
diodiogod b3f8255a33 Version 4.19.0
Add Qwen3-TTS engine with complete unified architecture integration

Implementation:
- Integrate official Qwen3-TTS with 3 model types (CustomVoice presets, VoiceDesign text-to-voice, Base voice cloning)
- Add Voice Designer node for creating voices from text descriptions
- Implement SRT processor with all timing modes and character switching
- Add sage attention support with proper cache invalidation
- Support 10 languages with automatic language switching
- Add inline edit tags support for Step Audio EditX post-processing
- Document Portuguese accent behavior and limitations
- Fix audio hash handling for nested voice structures
- Generate YAML-driven engine documentation tables
v4.19.0
2026-01-28 11:19:49 -03:00
diodiogod 4f0782e75d Show all 10 engines in README comparison table
- Removed arbitrary filtering that only showed 7 engines
- Now displays complete engine list for informative overview
- Table remains condensed (4 columns) but comprehensive
2026-01-28 11:14:26 -03:00
diodiogod 28a738662e Clean up README condensed engine table
- Remove Speed column (unnecessary for overview)
- Remove 🎯 emoji from title (too many emojis)
- Add ChatterBox to featured engines (now shows 7 engines)
2026-01-28 11:10:29 -03:00
diodiogod ddadcdfec5 Add auto-generated condensed engine table to README and integrate with bump-version
- Enhanced table generator to create condensed 6-engine overview for README
- Auto-inject condensed table into README between HTML comment markers
- Added speed emojis (⚡⚡ Very Fast, ⚡ Fast, 🐌 Slow) for quick scanning
- Integrated table generation into bump-version script (runs on all bumps)
- Generator is idempotent: unchanged YAML = no git changes
- Usage: python scripts/generate_engine_tables.py --readme
- Table appears at top of README, right after project description
2026-01-28 11:06:44 -03:00
diodiogod 6c87d67ed7 Add YAML-driven engine documentation table generator
- Created comprehensive YAML source of truth for all TTS engines
- Implemented Python generator for 3 documentation tables:
  * ENGINE_COMPARISON.md - Main engine overview with capabilities
  * LANGUAGE_SUPPORT.md - Detailed language support matrix
  * FEATURE_COMPARISON.md - Feature capabilities comparison
- YAML captures all engine metadata without information loss
- Tables auto-generated via scripts/generate_engine_tables.py
- Added flag emojis to language support table for easy scanning
- Speed performance fixes: F5-TTS marked as "Very Fast"
2026-01-28 10:50:10 -03:00
diodiogod 5af9368406 Update README.md 2026-01-28 09:27:22 -03:00
diodiogod 3a00e7d104 Update README with Qwen3-TTS documentation
Added:
- Qwen3-TTS to project timeline (v4.19)
- What's New section with 3 model types (CustomVoice, VoiceDesign, Base)
- Model download section with correct variants (VoiceDesign 1.7B only)
- Table of contents entry
- Multi-engine TTS feature list update

Model details:
- CustomVoice: 0.6B/1.7B with 9 preset speakers
- VoiceDesign: 1.7B only with text-to-voice design (unique)
- Base: 0.6B/1.7B with zero-shot cloning
- 10 languages supported
- Auto-download for all variants
2026-01-28 09:25:14 -03:00
diodiogod 077d7037d6 Add Qwen3-TTS SRT processor with character switching and language support
Implemented:
- Complete SRT processor delegating to Qwen3TTSProcessor for generation
- Character switching with CustomVoice preset mapping + Base cloning
- Language switching via character language defaults
- Overlap detection and smart_natural fallback
- Interrupt handling for cancellation support
- Job tracking with progress bars at subtitle level
- All timing modes (stretch_to_fit, pad_with_silence, concatenate, smart_natural)

Fixes:
- Audio hash handling for file path voice references
- Device mismatch on VRAM clear with explicit nested component movement
- Cache key includes voice_preset, model_size, attn_implementation for proper reload
- Segment language application from character defaults
2026-01-28 09:11:38 -03:00
diodiogod 71ca26da0e Fix NameError: attn_impl not defined in qwen3_tts_adapter
Replaced leftover debug variable reference with params.get()
2026-01-28 01:29:04 -03:00
diodiogod 845ffc3c05 Add Step Audio EditX inline edit tags support to Qwen3-TTS
Qwen3-TTS now supports inline edit tags for post-processing:
- Paralinguistic tags: <Laughter>, <Breathing>, <Sigh>, etc.
- Emotion tags: <emotion:happy>, <emotion:sad:2>, etc.
- Style tags: <style:whisper>, <style:shout>, etc.

Implementation:
- Extract edit tags from text before TTS generation
- Generate audio with clean text (tags removed)
- Apply Step Audio EditX post-processing to insert effects
- Works with both chunked and non-chunked generation paths

Matches existing implementation in Higgs Audio, VibeVoice, ChatterBox engines.

Files changed:
- nodes/qwen3_tts/qwen3_tts_processor.py: Added inline edit tag support
2026-01-28 01:21:06 -03:00
diodiogod a8f49bea1e Add sage_attn support to Qwen3-TTS with proper cache invalidation
Implements sage attention (sageattention) for Qwen3-TTS with:
- Auto-detection priority: sage_attn > flash_attention_2 > sdpa > eager
- Post-load attention module patching for sage_attn
- Graceful fallback to sdpa if sage_attn fails
- Proper cache invalidation on attention mode changes

Cache improvements:
- Added attn_implementation to engine instance cache key
- Added attn_implementation to audio cache key generator
- Added x_vector_only_mode to audio cache key (was missing)
- Prevents cache hits when switching attention modes

VRAM management improvements:
- Proactively unload old same-engine model variants before loading new ones
- Prevents VRAM accumulation when changing parameters (attn, dtype, etc.)
- Smart offloading when VRAM pressure detected by ComfyUI

Files changed:
- nodes/engines/qwen3_tts_engine_node.py: Added sage_attn to dropdown
- utils/models/unified_model_interface.py: Sage attention detection & patching
- nodes/unified/tts_text_node.py: Include attn_implementation in cache key
- engines/adapters/qwen3_tts_adapter.py: Pass attn_implementation to cache
- utils/audio/cache.py: Include attn_implementation & x_vector_only in cache
- utils/models/.../model_manager.py: Proactive same-engine variant unloading
2026-01-28 01:13:40 -03:00
diodiogod 94df261046 Update Qwen3-TTS tooltips to document Portuguese accent limitations
Added clarifying tooltips based on user testing to explain how Portuguese
accents work with different model types.

## Language Tooltip Updates

Added note explaining Portuguese accent behavior:
- Base model: European Portuguese only (cannot do Brazilian)
- CustomVoice + instruction: Can produce Brazilian Portuguese accent
- Example instruction provided: 'Speak with Brazilian Portuguese accent'

## Instruction Tooltip Updates

Enhanced with accent control examples:
- Added 'Accent' category with Brazilian Portuguese example
- Noted that English instructions work best (even for non-English voices)
- Kept existing emotion/style examples

## Key Findings from Testing

- Base model voice cloning defaults to European Portuguese regardless of reference
- CustomVoice presets CAN produce Brazilian accent via instruction parameter
- English instructions more effective than Portuguese instructions
- VoiceDesign can create Brazilian voices but they revert to European when used
  in Base model TTS generation

These tooltips prevent user confusion about Portuguese language support and
provide actionable guidance for achieving Brazilian Portuguese output.
2026-01-28 00:26:57 -03:00
diodiogod fa74973ad5 Fix Qwen3-TTS audio hash error with nested dict structure
Fixed 'dict' object has no attribute 'cpu' error when using Voice Designer
voices with TTS Text node.

## Root Cause

Voice Designer and Character Voices nodes output unified NARRATOR_VOICE format:
{
    "audio": {"waveform": tensor, "sample_rate": 24000},
    "audio_path": "...",
    "reference_text": "...",
    ...
}

But TTS Text node was wrapping this AGAIN when creating voice_mapping:
{
    "waveform": audio_tensor,  # audio_tensor was already a dict!
    "sample_rate": 24000,
    "text": "..."
}

This created triple-nested structure that broke audio hashing.

## Fixes Applied

**TTS Text Node** (nodes/unified/tts_text_node.py):
- Extract actual waveform tensor from audio dict before creating voice_mapping
- Applied to all 6 places where audio_tensor is used:
  - Narrator voice mapping (line 1151)
  - Character ICL fallback (line 1183)
  - Character x_vector fallback (line 1217)
  - Character no-text fallback (line 1220)
  - Character no-audio fallback (line 1237)
- Pattern: Check if audio_tensor is dict, extract waveform/sample_rate if so

**Qwen3-TTS Adapter** (engines/adapters/qwen3_tts_adapter.py):
- Extract inner audio dict before passing to hash function
- Changed from passing full voice_ref to passing voice_ref['audio']

**Audio Hash Utility** (utils/audio/audio_hash.py):
- Added nested structure handling with fallback
- Detects Character Voices format {"audio": {...}} vs direct format
- Enhanced debug logging to diagnose structure issues

## Testing

- Voice Designer → TTS Text: Works without hash error
- Character Voices → TTS Text: Works without hash error
- Audio hashing generates stable keys for caching
- Both VoiceDesign and traditional voices function correctly
2026-01-28 00:15:21 -03:00
diodiogod 88feb3a99a Add Qwen3-TTS engine with Phase 1 implementation
Implements complete Qwen3-TTS integration following NEW_ENGINE_IMPLEMENTATION_GUIDE
with unified architecture, character switching, language support, and Voice Designer.

## Core Engine Implementation

**Engine Wrapper** (`engines/qwen3_tts/qwen3_tts.py`):
- Wraps official Qwen3-TTS implementation with .to() method for VRAM management
- Device checking before generation with automatic model reload
- Support for 3 model types: CustomVoice (presets), VoiceDesign (text-to-voice), Base (voice cloning)
- Progress bar integration via transformers streamer interface
- 24kHz mono audio output in ComfyUI-compatible format

**Bundled Implementation** (`engines/qwen3_tts/impl/`):
- Official Qwen3-TTS library bundled for stability
- Patched modeling_qwen3_tts.py (line 2069) for progress callback support
- Sox dependency stubbed out (25Hz models only, we use 12Hz)
- Supports 6 models: 0.6B/1.7B × CustomVoice/VoiceDesign/Base

**Adapter** (`engines/adapters/qwen3_tts_adapter.py`):
- Intelligent model selection based on context (voice_preset/node_type)
- Automatic switching: preset→CustomVoice, None→Base, Designer→VoiceDesign
- Full caching integration with audio_cache.generate_cache_key()
- Voice reference processing for Base model (audio + transcript)
- Character-to-speaker mapping for CustomVoice presets (deterministic MD5 hashing)

## Node Implementation

**Engine Configuration Node** (`nodes/engines/qwen3_tts_engine_node.py`):
- Unified interface with voice_preset dropdown (9 preset speakers + None for zero-shot)
- Model size selection: 0.6B (low VRAM) / 1.7B (high quality)
- Language dropdown: Auto + 10 languages (Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian)
- Conditional instruction field (locked when unsupported: Base model or 0.6B CustomVoice)
- Generation parameters: top_k, top_p, temperature, repetition_penalty, max_new_tokens
- Advanced: dtype, attn_implementation, x_vector_only_mode

**Voice Designer Node** (`nodes/qwen3_tts/qwen3_tts_voice_designer_node.py`):
- UNIQUE FEATURE: Create voices from natural language descriptions
- Smart disk check: loads existing characters without model loading/generation
- Runtime caching for same-session regeneration optimization
- Saves to models/voices/ with standard format (.wav + .reference.txt + .txt metadata)
- Outputs unified NARRATOR_VOICE format matching Character Voices node
- Duplicate detection prevents regenerating identical voices

**TTS Processor** (`nodes/qwen3_tts/qwen3_tts_processor.py`):
- Full character switching support via character parser
- CustomVoice: deterministic character→preset mapping (preserves narrator's chosen preset)
- Base: uses models/voices/ audio references (standard voice cloning)
- VoiceDesign: uses saved voice descriptions from Designer node
- Pause tag processing with silence generation
- Language switching support via [language:Character] tags
- Segment parameter support ([seed:X], [temperature:0.8])
- Interrupt handling for cancellation
- Chunk combining with ChunkCombiner + ChunkTimingHelper

## JavaScript Widget

**Widget Locking** (`web/qwen3_tts_widgets.js`):
- Conditional UI: locks instruction field when unsupported
- Locked when: voice_preset="None" OR (model_size="0.6B" + preset selected)
- Console warnings explain limitations
- Preserves field value when locked (doesn't clear)

## System Integration

**Language Support** (`utils/models/language_mapper.py`):
- Added QWEN3_TTS_LANGUAGE_MAP: maps ISO codes to full names (e.g., "po"→"Portuguese")
- Added map_language_code_to_qwen3_tts() helper function
- Added "po" to global LANGUAGE_ALIASES (maps to pt-pt)
- Qwen3-TTS expects FULL language names, not ISO codes

**Unified Model Interface** (`utils/models/unified_model_interface.py`):
- Registered qwen3_tts factory in initialize_all_factories()
- Consolidated loading messages (single-line model loading output)
- Context-based model selection (VoiceDesign/CustomVoice/Base)

**Segment Parameters** (`utils/text/segment_parameters.py`):
- Added "qwen3_tts" to PARAMETER_ENGINES for inline tag support

**Voice Discovery** (`utils/voice/discovery.py`):
- Enhanced get_character_mapping() to detect VoiceDesign saved voices
- Checks for voice metadata format (description vs audio reference)
- Returns voice type for processor to handle correctly

**TTS Text Node** (`nodes/unified/tts_text_node.py`):
- Added qwen3_tts processor routing
- CustomVoice console messages (shows preset speaker instead of narrator warning)
- Recognizes unified NARRATOR_VOICE format from Voice Designer
- Language code mapping display (shows "po" → "Portuguese" conversion)

**Node Registration** (`nodes.py`):
- Registered Qwen3TTSEngineNode and Qwen3TTSVoiceDesignerNode
- Added error handling with fallback messages

## Features Implemented (Phase 1 Complete)

✅ Basic engine integration with unified architecture
✅ Character switching (CustomVoice presets + Base model cloning)
✅ Language switching (10 languages + Auto detection)
✅ Pause tags ([pause:1.5])
✅ Segment parameters ([seed:42], [temperature:0.8])
✅ Audio caching (prevents duplicate generation)
✅ VRAM management (.to() method + device checking)
✅ Interrupt handling (user cancellation)
✅ Progress bars (console + ComfyUI)
✅ Voice Designer (text-to-voice creation)
✅ Smart disk caching (skips regeneration for saved voices)
✅ Unified NARRATOR_VOICE output format

## Technical Details

- **Sample Rate**: 24kHz mono
- **Models**: 6 variants (0.6B/1.7B × CustomVoice/VoiceDesign/Base)
- **Tokenizer**: Qwen3-TTS-Tokenizer-12Hz (12.5 fps, 16 quantizers)
- **Languages**: 10 (Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian)
- **CustomVoice Presets**: 9 (Vivian, Serena, Uncle_Fu, Dylan, Eric, Ryan, Aiden, Ono_Anna, Sohee)
- **Audio Format**: torch.Tensor [1, 1, samples] at 24kHz
- **Cache Integration**: Uses audio_cache with stable key generation
- **Character Mapping**: MD5-based deterministic assignment (cache-friendly)

## Testing Completed

- Engine node loads and configures correctly
- Preset voice generation (CustomVoice with 9 speakers)
- Zero-shot cloning (Base model with voice references)
- Voice Designer text-to-voice generation
- Character switching with automatic preset mapping
- Pause tags create correct silence durations
- Language selection and switching
- Caching prevents duplicate generation
- VRAM management (Clear VRAM + reload)
- Generation info reports with timing
- Interrupt cancellation
- Widget locking behavior
- Disk check optimization (skips model loading for existing voices)

## Phase 2+ (Future)

- SRT processor integration (Phase 4)
- Streaming generation (requires special deployment)
- Fine-tuning nodes (advanced feature)
2026-01-28 00:02:02 -03:00
diodiogod 2b3351a047 Attempt to fix Step Audio EditX FunASR import on embedded Python
- Changed AutoModel imports to bypass import_submodules() bottleneck
- Import directly from funasr_detach.auto.auto_model instead of package level
- May resolve 'NoneType' object is not callable error in embedded Python
- Needs testing on affected systems

Related to issue #226
2026-01-27 19:18:12 -03:00
diodiogod 71bfb2b04e Version 4.18.0
Add VibeVoice Hindi community finetune support

Implementation details:
- Add vibevoice-hindi-1.5B and vibevoice-hindi-7B models to registry
- Support tarun7r Hindi finetunes with proper file structures
- Import full VIBEVOICE_MODELS registry in engine node
- Enable HF CLI progress bars by removing capture_output suppression
- Update model dropdown tooltip with Hindi model information
2026-01-26 23:41:36 -03:00
diodiogod a8e2de16e7 Version 4.17.0
Add Vietnamese (Viterbox) community finetune support

Implementation details:
- Add Vietnamese (Viterbox) as model_version option for ChatterBox Official 23-Lang
- Support dolly-vn/viterbox repository with expanded Vietnamese tokenization (2549 tokens)
- Add flexible T3 model filename detection for community finetunes
- Add version normalization for file lookups and tokenizer selection
- Add Vietnamese language code mapping in language_mapper.py
- Fix vocab size detection by loading tokenizer before T3 model initialization
- Support 'as-is' format handling for mixed .pt/.safetensors community models
2026-01-25 01:20:30 -03:00
diodiogod 65ddbca887 Version 4.16.14
Fix macOS dependency detection for Homebrew libraries

Technical details:
- Add _find_macos_library() helper with Homebrew path checking
- Check /opt/homebrew/lib (Apple Silicon) and /usr/local/lib (Intel)
- Use glob pattern matching for .dylib files
- Fix false negatives for properly installed libsamplerate and portaudio
2026-01-24 20:40:30 -03:00
diodiogod 574684a781 Version 4.16.13
Fix Step Audio EditX FunASR model registration on Python 3.12

Technical details:
- Add setuptools>=65.0.0 to requirements.txt for distutils compatibility
- Fixes FunASR bundled code that uses distutils.version.LooseVersion
- Embedded Python 3.12+ installations lack setuptools by default
- Without setuptools, FunASR models fail to register silently
- Resolves 'NoneType' object is not callable error in model loading
2026-01-21 16:40:13 -03:00
diodiogod c4a3a9ace6 Version 4.16.12
Fix Step Audio EditX import errors

Technical details:
- Change absolute imports to relative imports in tts.py and tts_infer.py
- Resolve config module name collision causing ModuleNotFoundError
- Prevent Python from finding wrong config.py files in sys.path
2026-01-20 21:33:16 -03:00
diodiogod 842100d05f Version 4.16.11
Fix F5-TTS vocab.txt path resolution

Technical details:
- Fix redundant 'infer/' prefix in utils_infer.py:254
- Corrects doubled path when __package__ already points to infer directory
- Addresses issue #222
2026-01-16 00:12:51 -03:00
diodiogod 4bec0df81c Version 4.16.10
Fix Step Audio EditX dtype parameter and GPU compatibility

Technical details:
- Fix incorrect dtype parameter name in model_loader.py (dtype → torch_dtype)
- Add GPU compute capability detection for automatic bf16/fp16 selection
- Change default precision from bf16 to auto mode with SM 8.0+ detection
2026-01-10 23:33:27 -03:00
diodiogod d195a6a51e Update README.md 2026-01-08 08:31:45 -03:00
diodiogod bf624cac57 Version 4.16.9
Fix CosyVoice TensorRT implementation bugs

Technical details:
- Fix missing 't' and 'spks' inputs in TensorRT shape configuration
- Fix hardcoded batch_size=2 to use dynamic batch size from input
- Fix lazy loading losing TRT/vLLM initialization parameters
- Add optimization loading debug messages
2026-01-07 15:17:47 -03:00
diodiogod 26cb0790c1 Update vLLM API compatibility and PROJECT_INDEX documentation
- Update CosyVoice2 vLLM wrapper for vLLM 0.11.2+ API (removed sampling_metadata parameter)
- Add missing CosyVoice3 files to PROJECT_INDEX.md
2026-01-07 11:41:57 -03:00
diodiogod 29e2fbf604 Version 4.16.8
Add IndexTTS-2 QwenEmotion debug logging

Technical details:
- Add debug output showing QwenEmotion model path detection
- Show whether path exists and is a directory
- Help diagnose issue #181 where model isn't being found
2026-01-05 13:58:59 -03:00
diodiogod dfc86e868d Version 4.16.7
Merge PR #218: Fix extra_model_paths.yaml voices discovery

- Add 'voices' to folder_type lookup in _load_tts_paths()
- Change _setup_default_tts_paths() to skip already-configured keys
- Prevent default paths from overwriting user-configured voices paths

Resolves #63
2026-01-03 11:13:11 -03:00
diodiogodandAndy Williams ff0f1947bb Merge PR #218: Use voices from ComfyUI folder_names_and_paths
Fixes issue #63 - voices folder not being picked up from extra_model_paths.yaml

Changes:
- Add 'voices' to folder_type lookup in _load_tts_paths()
- Always call _setup_default_tts_paths() but skip already-configured keys
- Prevents overwriting user-configured voices paths from extra_model_paths.yaml

Co-authored-by: Andy Williams <sobakasu@users.noreply.github.com>
2026-01-03 11:12:11 -03:00
diodiogod c85f93b5c7 Version 4.16.6
Fix CosyVoice3 character voice mode selection

Technical details:
- Clear reference_text when character has audio but no .txt file
- Force cross_lingual mode for characters without text transcripts
- Prevent zero_shot mode from using wrong voice characteristics
- Fix both processor and adapter character handling
- Fixes issue where characters without .txt used default narrator's text
2026-01-03 10:30:23 -03:00
diodiogod 7d9438ced1 Version 4.16.5
Fix CosyVoice3 PyYAML compatibility across all entry points

Technical details:
- Add max_depth patch to all CosyVoice import chains
- Patch engine wrapper, adapter, processor, SRT processor, and engine node
- Ensure yaml module is patched before any hyperpyyaml imports
- Addresses GitHub issue #220 more comprehensively
2026-01-03 10:21:18 -03:00
diodiogod 4926a24483 Version 4.16.4
Fix CosyVoice3 PyYAML 6.0+ compatibility

Technical details:
- Add max_depth attribute to YAML loaders for hyperpyyaml compatibility
- Patch bundled code to support PyYAML 6.0+ versions
- Fix 'Loader' object has no attribute max_depth error
- Fixes GitHub issue #220
2026-01-02 13:50:19 -03:00
diodiogod 14c95fd981 Version 4.16.3
Fix CosyVoice3 device mismatch errors

Technical details:
- Add explicit nested module device placement in bundled code
- Ensure all LLM, flow, and hift submodules moved to correct device
- Address PyTorch 2.9.1 compatibility issues with nested model layers
- Fixes GitHub issues #216 and #212
2026-01-02 13:44:24 -03:00
diodiogod 6fdaa0a188 Version 4.16.2
Fix IndexTTS-2 external installation detection

Technical changes:
- Replace keyword-based path detection with path-based detection
- Check if indextts module is inside TTS Audio Suite directory structure
- Fix false positives when ComfyUI installed in directories containing 'conda', 'pip', etc.
- Improve error message to show both detected and expected paths

Address issue #213 - User reported false positive when using conda environment
2026-01-02 13:30:19 -03:00
Andrew Williams 33629f30a5 Use voices from ComfyUI folder_names_and_paths 2025-12-31 13:21:45 +10:30
diodiogod 164c7f65a7 Version 4.16.1
Fix IndexTTS-2 QwenEmotion model loading on certain Python/modelscope versions

Technical details:
- Change QwenEmotion import from modelscope to transformers
- Fix 'dict' object has no attribute 'model_type' error
- Model is from HuggingFace, should use native transformers loader
- Addresses issue #181 (tentative fix pending user testing)
2025-12-29 22:44:37 -03:00
diodiogod 33643e4f7f Version 4.16.0
Add CosyVoice3 TTS engine with voice conversion

Implementation:
- Integrate FunAudioLLM/Fun-CosyVoice3-0.5B official engine
- Bundle official implementation with Matcha-TTS dependency
- Add model variant support (standard and RL-enhanced)
- Implement auto-mode detection (zero_shot/instruct/cross_lingual)
- Add character and language switching support
- Add SRT subtitle timing support
- Add Voice Changer with iterative refinement cache
- Add paralinguistic tag support (<laughter>, <breath>, etc.)
- Add live token-level progress bar with ETA
- Implement proper VRAM management and cache invalidation
- Fix model discovery to respect extra_model_paths.yaml (ChatterBox, RVC)
- Fix RVC chunking errors for short audio segments

Credit: Initial implementation by @tazztone (https://github.com/tazztone/TTS-Audio-Suite)
Testing infrastructure by @tazztone
v4.16.0
2025-12-29 22:09:51 -03:00
diodiogod 944a47b5c9 Move test configuration files to tests folder 2025-12-29 21:59:10 -03:00
diodiogod 854c7769fb Remove test files from root and untrack tests/output/ 2025-12-29 21:57:06 -03:00
diodiogod 4e6da21b65 Update CosyVoice3 tooltip with RL variant info and set as default 2025-12-29 21:55:12 -03:00
diodiogod 524c2d7bd4 Add CosyVoice3 model variant support with lazy downloading
Implements support for Fun-CosyVoice3-0.5B (standard) and Fun-CosyVoice3-0.5B-RL variants with lazy downloading:
- Only downloads variant-specific LLM file (~2GB) when needed
- Shared files (flow.pt, hift.pt, etc.) downloaded once and reused
- Both variants use same folder: Fun-CosyVoice3-0.5B
- Proper cache invalidation when switching between variants

Technical changes:
- Patched bundled CosyVoice library to accept llm_filename parameter
- Modified downloader to use SHARED_FILES + variant-specific LLM
- Audio cache now includes model_variant in hash calculation
- Model loading cache uses llm_filename in additional_params
- Added variant detection in path resolution and verification
2025-12-29 21:52:13 -03:00
diodiogod 41b1bda1e5 Add CosyVoice3 model variant support and documentation
- Add Fun-CosyVoice3-0.5B-RL (default, better quality) and Fun-CosyVoice3-0.5B variants
- Use ChatterBox 23-Lang pattern: shared folder, both llm.pt/llm.rl.pt files, symlink switching
- Saves ~3.4GB by sharing common files (flow.pt, hift.pt, campplus.onnx, CosyVoice-BlankEN/)
- Switching variants invalidates cache (different model_identifier)
- Add COSYVOICE3_TAGS_GUIDE.md: concise guide for native paralinguistic tags
- Update README: What's New section, model download links, shared folder structure
2025-12-29 20:54:46 -03:00
diodiogod 79eb96d0de Clean up CosyVoice verbose logging
- Changed 'yield speech len, rtf' messages from info to debug level
- Reduces console pollution during voice conversion
- RTF info only useful for performance debugging, not regular use
2025-12-29 20:05:46 -03:00
diodiogod edf5f011a8 Fix RVC chunking error by preventing chunks shorter than 1 second
- Added minimum chunk duration check (1s) to prevent RVC RMS calculation errors
- Both smart and fixed chunking now merge last chunk with previous if too short
- Fixes ValueError: window shape cannot be larger than input array shape
- RVC's calculate_rms() requires minimum 0.5s audio (frame_length = sr/2)
- Using 1s threshold as safe margin for all VC engines
2025-12-29 20:01:17 -03:00
diodiogod cb7452015d Fix RVC model discovery to respect extra_model_paths.yaml
RVC model loader was only checking folder_paths.models_dir (hardcoded path)
instead of using extra_model_paths.yaml configuration. This caused:
- RVC models in symlinked/custom paths not appearing in dropdown
- Users unable to use models from configured alternate locations

Now uses get_all_tts_model_paths() to search all configured TTS paths first,
with fallback to legacy hardcoded paths for backwards compatibility.

Applies to both:
- RVC .pth model files
- RVC .index files

Models from extra_model_paths.yaml now show up as "local:filename.pth" in
the Load RVC Character Model node dropdown.
2025-12-29 19:41:08 -03:00
diodiogod b2c4d19641 Clean up verbose CosyVoice VC logging
Removed excessive debug output from inference_vc:
- Removed verbose box with temp file paths
- Removed duplicate duration message from engine layer
- Keep informative processor message with duration + cache status

Output now shows clean single-line completion with cache info:
'✅ CosyVoice3 VC: Conversion completed (X.Xs) (cache status)'
2025-12-29 19:38:50 -03:00
diodiogod c2bb619206 Fix ChatterBox model discovery to respect extra_model_paths.yaml
ChatterBox was only checking folder_paths.models_dir (hardcoded ComfyUI path)
instead of using extra_model_paths.yaml configuration. This caused:
- Failed model loads from symlinked/custom paths
- Unnecessary re-downloads when models exist in configured paths
- "Model not found" errors for valid installations

Now uses get_all_tts_model_paths() to search all configured TTS paths first,
with fallback to legacy hardcoded paths for backwards compatibility.

Fixes issue where chunked VC would fail to find models in symlinked directories
and attempt to re-download models that were already installed.
2025-12-29 19:35:05 -03:00
diodiogod 6fff668ec6 Add CosyVoice Voice Changer support with iterative cache and chunking
Implemented:
- CosyVoice VC processor with temp file-based approach (matches ChatterBox pattern)
- Iterative refinement cache (up to 10 passes, vs ChatterBox's 5)
- Full chunking support for long audio (smart/fixed modes with crossfade)
- Model lazy loading via _ensure_model_loaded()
- Automatic cleanup via __del__ destructor

Files:
- nodes/cosyvoice/cosyvoice_vc_processor.py: New VC processor
- engines/cosyvoice/cosyvoice.py: Added inference_vc() method
- engines/adapters/cosyvoice_adapter.py: Added VC wrapper
- nodes/unified/voice_changer_node.py: CosyVoice integration with chunking

Cache optimization allows resuming from intermediate iterations and instant
returns for exact matches. CosyVoice gets 10-pass cache limit due to more
resilient refinement quality compared to ChatterBox.
2025-12-29 19:27:10 -03:00
diodiogod bd268dca97 Clarify CosyVoice speed parameter is post-processing, not natural synthesis
Updated tooltip to explain:
- Speed uses mel-spectrogram interpolation (official implementation)
- Applied AFTER generation, not during synthesis
- Results in artificial sped-up/slowed-down audio effect
- This is a limitation of the official CosyVoice model architecture
- Not a natural prosody/rhythm change

Based on code analysis: engines/cosyvoice/impl/cosyvoice/cli/model.py:162
Uses F.interpolate on mel features before vocoder conversion
2025-12-29 18:38:59 -03:00