Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This project is still working but some stuff is deprecated #43

Open
CyberT33N opened this issue Nov 8, 2024 · 1 comment
Open

This project is still working but some stuff is deprecated #43

CyberT33N opened this issue Nov 8, 2024 · 1 comment

Comments

@CyberT33N
Copy link

CyberT33N commented Nov 8, 2024

First of all thank you for this amazing project. Secondly everything is still working but some stuff is deprecated. Here is how I make everything running:

Duplicated of:

However, maybe still usefully for people who want to use the UI


Install

Clone riffusion-hobby & riffusion-app-hobby

cd ~/Projects/ai/audio

git clone https://github.com/riffusion/riffusion-hobby.git
git clone https://github.com/riffusion/riffusion-app-hobby.git

Because the head commit is deprecated of riffusion-hobby and the latest torchaudio of requirements.txt is not supported you must modify self.inverse_mel_scaler:

  • ~/Projects/ai/audio/riffusion-hobby/riffusion/spectrogram_converter.py
# https://pytorch.org/audio/stable/generated/torchaudio.transforms.InverseMelScale.html
self.inverse_mel_scaler = torchaudio.transforms.InverseMelScale(
    n_stft=params.n_fft // 2 + 1,
    n_mels=params.num_frequencies,
    sample_rate=params.sample_rate,
    f_min=params.min_frequency,
    f_max=params.max_frequency,
    norm=params.mel_scale_norm,
    mel_scale=params.mel_scale_type,
).to(self.device)

Install and start riffusion-hobby:

cd ~/Projects/ai/audio/riffusion-hobby

# pyenv install 3.9
pyenv local 3.9

python3 -m venv venv
source venv/bin/activate

sudo apt install sox

# Those dependencies are missing in the head commit of requirements.txt
pip install numpy typing_extensions

python -m pip install -r requirements.txt

# cache_download not longer supported in latest version so we downgrade
pip install huggingface_hub==0.24.7

Install and start riffusion-app-hobby. Create .env.local and insert RIFFUSION_FLASK_URL=http://127.0.0.1:3013/run_inference/. Then run:

cd ~/Projects/ai/audio/riffusion-app-hobby

npm i
npm run dev
@amuhareb
Copy link

Thanks for the write up, I look forward to trying it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants