Commit Graph
4 Commits
Author SHA1 Message Date
diodiogod c19837675d Fix librosa STFT/ISTFT tensor format compatibility with torchlibrosa
- LibrosaSTFT transposes output from [batch, freq, time] to [batch, time, freq]
- LibrosaISTFT transposes input back from [batch, time, freq] to [batch, freq, time]
- Ensures compatibility with VoiceFixer's downstream STFT operations
- Resolves matrix multiplication shape errors after removing torchlibrosa dependency
2025-10-29 16:14:23 -03:00
diodiogod d0e67b2db2 Fix tensor shape in wav_to_spectrogram_phase for librosa STFT
- Add unsqueeze(1) to maintain 4D shape [batch, channels, freq, time]
- Previously was incorrectly concatenating on dim=1, flattening to 3D
- Fixes permute dimension mismatch error when using librosa-based STFT
- Now properly maintains channel dimension for multi-channel processing
2025-10-29 16:07:22 -03:00
diodiogod 6782361bc6 Remove torchlibrosa dependency by using librosa-based STFT/ISTFT
- Replace torchlibrosa with custom LibrosaSTFT and LibrosaISTFT wrappers
- Maintain full API compatibility with existing FDomainHelper code
- No quality loss - mathematically equivalent FFT implementations
- Handles batch processing and device/dtype preservation
- Removes dependency since we already require librosa
- ~0.1-0.2s slower per audio (CPU instead of GPU STFT) but acceptable trade-off
2025-10-29 16:04:56 -03:00
diodiogod 40f0e873be Integrate Voice Fixer audio restoration (Issue #153)
- Bundle VoiceFixer locally to avoid cache downloads
- Create voice_fixer_downloader for TTS/voicefixer/ model management
- Implement Voice Fixer node with 3 restoration modes (original, high-freq removal, train mode)
- Register node in nodes.py with proper error handling
- Patch bundled VoiceFixer hardcoded paths to use TTS/voicefixer/ directory
- Disable auto-download in restorer/__init__.py, handled by node instead
- Support lazy loading and CUDA acceleration
- All models download to organized TTS/ folder, never to cache
2025-10-29 14:15:52 -03:00