Files
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

21 lines
732 B
Python

"""
ComfyUI Model Wrapper for TTS Audio Suite
This module provides wrappers that make TTS models compatible with ComfyUI's
model management system, enabling automatic memory management, "Clear VRAM"
button functionality, and proper integration with ComfyUI's model lifecycle.
"""
# Core exports for backward compatibility
from .base_wrapper import ComfyUIModelWrapper, ModelInfo
from .model_manager import ComfyUITTSModelManager, tts_model_manager
from .cache_utils import is_engine_cache_valid, _global_cache_invalidation_flag
__all__ = [
'ComfyUIModelWrapper',
'ModelInfo',
'ComfyUITTSModelManager',
'tts_model_manager',
'is_engine_cache_valid',
'_global_cache_invalidation_flag'
]