audio-webui icon indicating copy to clipboard operation
audio-webui copied to clipboard

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

Open rookiemann opened this issue 1 year ago • 2 comments

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 avatar Aug 29 '24 17:08 rookiemann

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."

rookiemann avatar Aug 29 '24 17:08 rookiemann

So, there nothing we can do to fix this problem ?

mondermurshed avatar Feb 24 '25 15:02 mondermurshed