Comments (7)
I use Windows 10
Requirements:
- Python ( I use Python3.11, README says 3.8, pick your poison .... )
- Git
Disclaimer: I normally use Linux, so my Windows Powershell skills are very limited. Improvements and suggestions are welcome!
Nevertheless this guide should get u started:
Step 1 - Check requirements
Open Powershell and check if Python and Git are callable. Typing git
should show the help string and calling python
should throw you into a Python console ( quit via quit()
or exit()
)
Step 2 - Create project environment
Navigate to a folder of your trust ( I use my home directory, C:\Users\Lars\
) and create a project folder ( this can be done via File Explorer of course )
In my case the path to the project folder is: C:\Users\lars\Coding\musicgen
Open your folder in Powershell and create the virtual environment:
PS C:\Users\lars\Coding\musicgen> python -m venv venv # second "venv" is the env name!
After that you should see a new folder called venv
inside your project folder, containing your Python virtual environment.
Step 3 - Python requirements installation
If you feel lucky you can leave the whole dependency struggle to pip and start installation into virtualenv now like suggested in the README. To install dependencies we call pip
from our virtual environment. I do not use virtualenv's activate-Scripts, but call the executable directly. The call would then look like:
PS C:\Users\lars\Coding\musicgen> .\venv\Scripts\pip.exe install git+https://github.com/haoheliu/AudioLDM2.git
But this may lead to strange installations ( i did not try that at all ... i'm a chicken ) and problems with your torch installation. Also CUDA is a thing for me, so i want support for it in my installation.
So i installed dependencies by hand, with slightly different pytorch versions than stated in requirements.txt
.
Start with pytorch, get the correct command from here: https://pytorch.org/get-started/locally/
In my case the installation command was:
PS C:\Users\lars\Coding\musicgen> .\venv\Scripts\pip.exe install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
After that i installed the rest of the dependencies and the program itself via pip via the command shown above:
PS C:\Users\lars\Coding\musicgen> .\venv\Scripts\pip.exe install git+https://github.com/haoheliu/AudioLDM2.git
Step 4 - Check installation
Installation done, yay! 🚀 We're only one trap away from creating sound!
As stated here #10 , the startup script on Windows seems to be broken ( not really broken, but not callable directly ) after installation ( maybe i'll dive into that one later ).
But you can call it nevertheless via Python interpreter, in my case the command looks like:
PS C:\Users\lars\Coding\musicgen> .\venv\Scripts\python.exe .\venv\Scripts\audioldm2 -t "A jazzy melody for crazy people"
I hope that helps to get u started! 🎸
@haoheliu Any suggestions? Did i miss something?
from audioldm2.
What OS do you use?
Then the steps are basically something like:
- Create a virtualenv
- Install AudioLDM2 into the virtualenv
- Run AudioLDM2 from virtualenv
If u tell me the OS i can give u an installation sequence.
from audioldm2.
What OS do you use?
Then the steps are basically something like:
- Create a virtualenv
- Install AudioLDM2 into the virtualenv
- Run AudioLDM2 from virtualenv
If u tell me the OS i can give u an installation sequence.
I use Windows 10
from audioldm2.
How do I call the Gradio web app?
from audioldm2.
How do I call the Gradio web app?
Step 5 - WebApp
If you followed the guide we did not clone the repository yet but installed AudioLDM2 into a Python virtualenv. Unfortunately the WebApp ( app.py
) does not seem to get shipped via installation right now, so we must fetch it via the git repository as stated in the README.
To run the WebApp ( which i personally do not use ) clone the repository into the project folder and start app.py
afterwards.
Following the example here the launch command would be:
PS C:\Users\lars\Coding\musicgen> .\venv\Scripts\python.exe app.py
from audioldm2.
Step 5 - Start WebApp
UPDATE: Tried WebApp on Windows. Lots of struggle. First there is an error in torch because torch.compile
is not available on Windows. Shortened stacktrace when starting app.py
:
File "C:\Users\lars\Coding\AudioLDM2\app.py", line 28, in text2audio
audioldm = torch.compile(audioldm)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lars\Coding\AudioLDM2\venv\Lib\site-packages\torch\__init__.py", line 1441, in compile
return torch._dynamo.optimize(backend=backend, nopython=fullgraph, dynamic=dynamic, disable=disable)(model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lars\Coding\AudioLDM2\venv\Lib\site-packages\torch\_dynamo\eval_frame.py", line 413, in optimize
check_if_dynamo_supported()
File "C:\Users\lars\Coding\AudioLDM2\venv\Lib\site-packages\torch\_dynamo\eval_frame.py", line 375, in check_if_dynamo_supported
raise RuntimeError("Windows not yet supported for torch.compile")
RuntimeError: Windows not yet supported for torch.compile
So the WebApp seems to behave different from the commandline tool. But even after deactivating the corresponding line ( as it is not present in the CLI-tool this should be fine ), we may run into the next error. Another shortened stacktrace, error happens during example buildup ( i guess ):
File "C:\Users\lars\Coding\AudioLDM2\app.py", line 40, in <listcomp>
gr.make_waveform((16000, wave[0]), bg_image="bg.png") for wave in waveform
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lars\Coding\AudioLDM2\venv\Lib\site-packages\gradio\helpers.py", line 803, in make_waveform
raise RuntimeError("ffmpeg not found.")
RuntimeError: ffmpeg not found
So we also need ffmpeg. Will install ffmpeg and try again. What could possibly go wrong? 🚀
from audioldm2.
Step 5 - Start WebApp
UPDATE2: Finally, after "installing" ffmpeg ( i just threw the executables into the folder, i'm lazy as f**k ), the WebApp starts on Windows and can be used!
from audioldm2.
Related Issues (20)
- How can I train this model by myself ?
- How to generate speech condition on not only transcripts and descriptions but also audio clip?
- Web app just keeps processing forever and not doing anything at all. HOT 1
- License HOT 1
- Model dropdown does not work
- Examples don't work
- . HOT 1
- Customizing voice / tone generation with specific input vocal
- AudioMAE on huggingface HOT 1
- Style transfer speech_to_text
- pretrained_model in class FirstStagePostProcessor(nn.Module)?
- 48k checkpoint not working
- Can't "import gradio as gr" but I've installed gradio
- What is the config of model "audioldm_48k"
- Hello, i use Seait and i have a problem HOT 1
- Plans to release AudioLDM2 training code? HOT 1
- What data is used for training the different checkpoints?
- cannot import name 'VitsModel' from 'transformers' HOT 2
- Evaluation Protocol
- is their a way to change speaker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audioldm2.