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
/
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
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
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