okio-ai / nendo

The Nendo AI Audio Tool Suite
MIT License
207 stars 12 forks source link

I keep on getting a strange error when trying to run music-gen plug in. #16

Closed aa221 closed 7 months ago

aa221 commented 9 months ago

Hope all is well,

I keep running into this error:

RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) Traceback (most recent call last): File "ML_Models/music_gen.py", line 22, in <module> nd = Nendo(config=NendoConfig(plugins=["nendo_plugin_musicgen"])) File "/Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/nendo/main.py", line 73, in __init__ self._load_plugins(plugin_names=plugin_names) File "/Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/nendo/main.py", line 141, in _load_plugins plugin_instance = self._load_plugin(module_name=module_name) File "/Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/nendo/main.py", line 129, in _load_plugin raise schema.NendoPluginLoadingError( nendo.schema.exception.NendoPluginLoadingError: Failed to import plugin 'nendo_plugin_musicgen'. Error: dlopen(/Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/av/_core.cpython-38-darwin.so, 2): Library not loaded: @loader_path/libX11.6.dylib Referenced from: /Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/av/.dylibs/libavformat.60.3.100.dylib Reason: no suitable image found. Did find: /Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/av/.dylibs/libX11.6.dylib: cannot load 'libX11.6.dylib' (load command 0x80000034 is unknown) /Users/adelabdalla/.pyenv/versions/3.8.12/lib/python3.8/site-packages/av/.dylibs/libX11.6.dylib: cannot load 'libX11.6.dylib' (load command 0x80000034 is unknown)

  When trying to execute: 

nd = Nendo(config=NendoConfig(plugins=["nendo_plugin_musicgen"]))

I'm not sure what is wrong with my local development. I've installed musicgen throguh pip install nendo etc however I keep getting this error. Any insight would be appreciated.

aaronabebe commented 9 months ago

Hi, thanks for trying out nendo!

The error message sounds like you may be missing ffmpeg on your local install. Please also make sure that you did install all the requirements.

From the error I'm assuming you're on MacOS, so can you try and run: brew install ffmpeg libsndfile portaudio

aa221 commented 9 months ago

Hi Aaron thanks for replying. I installed both but for some reason still no avail. Is there any other advice you have?

aaronabebe commented 9 months ago

If you are using an ARM based Mac and conda to manage your python enviroments, you could try to reinstall ffmpeg via:

brew uninstall ffmpeg

# in your conda env
conda install ffmpeg

Another issue could be that your python enviroment is not able to locate ffmpeg. Can you run which ffmpeg and echo $PATH and post what these commands return?

faradox commented 9 months ago

@aa221 flagging this issue for inactivity since there has been no response in 2 weeks. Have you been able to resolve this by now? If so, can you share your solution with the community? If it still persists, feel like sharing some more details about your environment with us, so we can help you debug this?