try:
# are we running on Google Colab?
import google.colab
!git clone -q https://github.com/teticio/audio-diffusion.git
%cd audio-diffusion
%pip install -q -r requirements.txt
except:
pass
NOTE: Saw this error at the end of running the first cell, not sure if it is related:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. ipython 7.9.0 requires jedi>=0.10, which is not installed.
Run the second cell
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath("")))
Launch the app
Press Submit from the web ui, with any of the models. In this example, I used the teticio/audio-diffusion-instrumental-hiphop-256 model in this case.
Web UI errors out, colab provides this traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 374, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1017, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 835, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 857, in run
item = self.queue.get()
File "/content/audio-diffusion/app.py", line 9, in generate_spectrogram_audio_and_loop
audio_diffusion = AudioDiffusion(model_id=model_id)
File "/content/audio-diffusion/audiodiffusion/__init__.py", line 30, in __init__
self.pipe = AudioDiffusionPipeline.from_pretrained(self.model_id)
File "/usr/local/lib/python3.8/dist-packages/diffusers/pipelines/pipeline_utils.py", line 828, in from_pretrained
transformers_version = version.parse(version.parse(transformers.__version__).base_version)
NameError: name 'transformers' is not defined
I'm currently using the colab at https://colab.research.google.com/github/teticio/audio-diffusion/blob/master/notebooks/gradio_app.ipynb
Steps to reproduce:
Run the first cell
NOTE: Saw this error at the end of running the first cell, not sure if it is related:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. ipython 7.9.0 requires jedi>=0.10, which is not installed.
Run the second cell
Launch the app
Press
Submit
from the web ui, with any of the models. In this example, I used theteticio/audio-diffusion-instrumental-hiphop-256
model in this case.Web UI errors out, colab provides this traceback: