Saturated audio with Stable Audio
Open
Potential Bug
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Expected Behavior
A clear sound!
### Actual Behavior
Music or loud sound effects made with Stable Audio are heavily saturated.
### Steps to Reproduce
I tried with every sampler, scheduler, and CFG possible, the issue is still there but **I found a way to fix it.**
### Debug Logs
```powershell
/
```
### Other
In nodes_audio.py in the class VAEDecodeAudio.
We should normalize the audio when decoding by adding these lines or something similar:
max_amplitude = torch.max(torch.abs(audio))
if max_amplitude > 1.0:
audio = audio / max_amplitude
This fixes the audio clipping

Contributor guide
Assessment
This issue has not been assessed yet.