gitmylo / audio-webui

A webui for different audio related Neural Networks
MIT License
1.02k stars 96 forks source link

[BUG REPORT] An exception occurred: 'cache_position' for AudioLDM2 #245

Open rookiemann opened 2 weeks ago

rookiemann commented 2 weeks ago

AudioLDM2 seems to be not working correctly, all the models for it do this.

There is no warning or exception on the cmd console, I just get that exception on the webui which doesn't give me much clues. I'm currently actively troubleshooting this.

image

rookiemann commented 2 weeks ago

Ok after some investigation the run.bat file isn't using the correct diffusors or transformers needed for the "audio-webui\webui\modules\implementations\audioldm2.py" file.

Claude says, "The problem lies in a version mismatch between the diffusers and transformers libraries. The error 'cache_position' occurs because the AudioLDM2 pipeline is trying to access a feature that's not present in the version of transformers being used when the application runs through run.bat. Specifically, the error happens in the language model generation process, where it's expecting a 'cache_position' key in the model's keyword arguments. This key is likely present in newer versions of the libraries but missing in the version that's actually being used when the application runs. In essence, the run.bat file is likely using an older or incompatible version of these libraries, causing the AudioLDM2 module to fail when generating audio."