diodiogod
d619d38747
Version 4.9.4
...
Fix VibeVoice garbage collection and auto device detection issues
Technical fixes:
- Add defensive gc import handling to prevent UnboundLocalError crashes
- Implement proper auto device detection for VibeVoice after model unloading
- Fix ComfyUI model wrapper gc.collect() scoping issues
- Improve device persistence for subsequent generations
- References issue #81 VibeVoice garbage collection errors
2025-09-16 19:21:47 -03:00
diodiogod
991be1ca85
Fix IndexTTS-2 device mismatch error after model unload/reload
...
- Add IndexTTS-2 specific recovery logic in model manager
- Handle device synchronization when model is corrupted after CPU offloading
- Clear cached model config and force device reload for all components
- Add recovery for both normal reuse and force_reload scenarios
- Matches existing patterns used for Higgs Audio and VibeVoice
Fixes: RuntimeError: Expected all tensors to be on the same device,
but got weight is on cpu, different from other tensors on cuda:0
2025-09-16 15:55:35 -03:00
diodiogod
d01e5cb807
Refactor comfyui_model_wrapper.py into modular architecture
...
- Split 970-line monolith into focused modules following 500-600 line policy
- Created utils/models/comfyui_model_wrapper/ directory structure:
- base_wrapper.py (302 lines): Core ComfyUIModelWrapper class
- model_manager.py (318 lines): ComfyUITTSModelManager class
- cache_utils.py (28 lines): Cache invalidation utilities
- engine_handlers/: Engine-specific memory management
- higgs_audio_handler.py: CUDA graph management and unload blocking
- vibevoice_handler.py: RAM cleanup and complete deletion logic
- generic_handler.py: Standard CPU migration for other engines
- Fixed engine routing bug where stateless_tts wrappers weren't using HiggsAudioHandler
- Maintained full backward compatibility with existing imports
- All engine-specific behaviors preserved (VibeVoice deletion, Higgs CUDA graphs)
- Updated PROJECT_INDEX.md to reflect modular structure
2025-09-11 14:57:52 -03:00