← 开源
riffusion

riffusion-hobby

Stable diffusion for real-time music generation

ApplicationsContent creationPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
3.90k
Star
476
Fork
+0
本周
6
贡献者
创建于 2022-11-25 · 更新于 2026-10-16 · 今日第 7752 名
主要开发者

riffusion/riffusion-hobby 排名第 7,752,有 3,900 个星标。

同类别比较

riffusion/riffusion-hobby 排名第 7,752,此处有 8 个同类条目;m1guelpf/chatgpt-telegram 排名第 7,755。

同类别比较
名称排名指标
bostrot/wslmanager7,719
语言:
Dart
星标数:
4,029
分叉数:
180
TianyiDataScience/openclaw-control-center7,725
语言:
TypeScript
星标数:
4,002
分叉数:
615
简介:
Turn OpenClaw from a black box into a local control center you can see, trust, and control.
sourcebot-dev/sourcebot7,729
语言:
Python
星标数:
3,990
分叉数:
372
简介:
Sourcebot is a self-hosted tool that helps humans and agents understand your codebase.
OpenHealthForAll/open-health7,734
语言:
TypeScript
星标数:
3,961
分叉数:
431
简介:
OpenHealth, AI Health Assistant | Powered by Your Data
m1guelpf/chatgpt-telegram7,755
语言:
Go
星标数:
3,881
分叉数:
537
简介:
Run your own GPTChat Telegram bot, with a single command!
skydoves/chatgpt-android7,756
语言:
Kotlin
星标数:
3,874
分叉数:
447
简介:
📲 ChatGPT Android demonstrates a Chatbot application using OpenAI's chat API on Android with Stream Chat SDK for Compose.
ailyProject/aily-blockly7,775
语言:
TypeScript
星标数:
3,841
分叉数:
221
简介:
AI IDE for hardware development, support Arduino, MicroPython, ESP32, STM32, RP2040, Nrf5x...
midday-ai/packrun7,777
语言:
TypeScript
星标数:
3,833
分叉数:
403
简介:
npm for agents and humans
关键参数与规格
关键参数与规格
参数值
语言Python
类别Applications
子类别Content creation
关键词Audio production, Music
星标数3,900
分叉数476
贡献者6
创建日期2022-11-25
更新日期2026-10-16
1 天星标数0
7 天星标数0
排名7,752
上次排名7,880
排名变化128
7 天星标排名11,807
上次 7 天星标排名11,862
7 天星标排名变化55
总星标排名3,540
上次总星标排名3,537
总星标排名变化-3
README 摘录

:guitar: Riffusion (hobby) :no_entry: This project is no longer actively maintained. Riffusion is a library for real-time music and audio generation with stable diffusion. Read about it at and try it at This is the core repository for riffusion image and audio processing code. Diffusion pipeline that performs prompt interpolation combined with image conditioning Conversions between spectrogram images and audio clips Command-line interface for common tasks Interactive app using streamlit Flask server to provide model inference via

API Various third party integrations Related repositories: Web app: Model checkpoint: Citation If you build on this work, please cite it as follows: Install Tested in CI with Python 3. It's highly recommended to set up a virtual Python environment with or : Install Python dependencies: In order to use audio formats other than WAV, ffmpeg is required. If torchaudio has no backend, you may need to install . If you have an issue, try upgrading diffusers. Guides: Simple Install Guide for

Windows Backends CPU is supported but is quite slow. CUDA is the recommended and most performant backend. To use with CUDA, make sure you have torch and torchaudio installed with CUDA support. To generate audio in real-time, you need a GPU that can run stable diffusion with approximately 50 steps in under five seconds, such as a 3090 or A10G. Test availability with: MPS The backend on Apple Silicon is supported for inference but some operations fall back to

CPU, particularly for audio processing. In addition, this backend is not deterministic. Test availability with: Command-line interface Riffusion comes with a command line interface for performing common tasks. See available commands: Get help for a specific command: Execute: Riffusion Playground Riffusion contains a streamlit app for interactive use and exploration. Run with: And access at Run the model server Riffusion can be run as a flask server that provides inference via API. This server enables the web app to

run locally. Run with: You can specify with your own directory or huggingface ID in diffusers format. Use the argument to specify the torch device to use. The model endpoint is now available at via POST request. Example input (see InferenceInput for the API): Example output (see InferenceOutput for the API): Tests Tests live in the directory and are implemented with . To run all tests: To run a single test: To preserve temporary outputs for debugging, set : To run a

single test case within a test: To run tests using a specific torch device, set . Tests should pass with , , and backends. Development Guide Install additional packages for dev with . Linter: Formatter: Type checker: These are configured in . The results of , , and *must* be clean to accept a PR. Contributions are welcome through pull requests.

常见问题

记录了多少星标和分叉?

riffusion/riffusion-hobby 有 3,900 个星标和 476 个分叉。

仓库排名是多少?

riffusion/riffusion-hobby 排名第 7,752。

记录的语言和类别是什么?

riffusion/riffusion-hobby 有 3,900 个星标,语言为 Python,类别为 Applications。

哪个仓库排名最接近?

riffusion/riffusion-hobby 与 m1guelpf/chatgpt-telegram 比较,后者排名第 7,755,有 3,881 个星标。

README

:guitar: Riffusion (hobby)

:no_entry: This project is no longer actively maintained.

Riffusion is a library for real-time music and audio generation with stable diffusion.

Read about it at https://www.riffusion.com/about and try it at https://www.riffusion.com/.

This is the core repository for riffusion image and audio processing code.

  • Diffusion pipeline that performs prompt interpolation combined with image conditioning
  • Conversions between spectrogram images and audio clips
  • Command-line interface for common tasks
  • Interactive app using streamlit
  • Flask server to provide model inference via API
  • Various third party integrations

Related repositories:

Citation

If you build on this work, please cite it as follows:

@article{Forsgren_Martiros_2022,
  author = {Forsgren, Seth* and Martiros, Hayk*},
  title = {{Riffusion - Stable diffusion for real-time music generation}},
  url = {https://riffusion.com/about},
  year = {2022}
}

Install

Tested in CI with Python 3.9 and 3.10.

It's highly recommended to set up a virtual Python environment with conda or virtualenv:

conda create --name riffusion python=3.9
conda activate riffusion

Install Python dependencies:

python -m pip install -r requirements.txt

In order to use audio formats other than WAV, ffmpeg is required.

sudo apt-get install ffmpeg          # linux
brew install ffmpeg                  # mac
conda install -c conda-forge ffmpeg  # conda

If torchaudio has no backend, you may need to install libsndfile. See this issue.

If you have an issue, try upgrading diffusers. Tested with 0.9 - 0.11.

Guides:

Backends

CPU

cpu is supported but is quite slow.

CUDA

cuda is the recommended and most performant backend.

To use with CUDA, make sure you have torch and torchaudio installed with CUDA support. See the install guide or stable wheels.

To generate audio in real-time, you need a GPU that can run stable diffusion with approximately 50 steps in under five seconds, such as a 3090 or A10G.

Test availability with:

import torch
torch.cuda.is_available()

MPS

The mps backend on Apple Silicon is supported for inference but some operations fall back to CPU, particularly for audio processing. You may need to set PYTORCH_ENABLE_MPS_FALLBACK=1.

In addition, this backend is not deterministic.

Test availability with:

import torch
torch.backends.mps.is_available()

Command-line interface

Riffusion comes with a command line interface for performing common tasks.

See available commands:

python -m riffusion.cli -h

Get help for a specific command:

python -m riffusion.cli image-to-audio -h

Execute:

python -m riffusion.cli image-to-audio --image spectrogram_image.png --audio clip.wav

Riffusion Playground

Riffusion contains a streamlit app for interactive use and exploration.

Run with:

python -m riffusion.streamlit.playground

And access at http://127.0.0.1:8501/

Run the model server

Riffusion can be run as a flask server that provides inference via API. This server enables the web app to run locally.

Run with:

python -m riffusion.server --host 127.0.0.1 --port 3013

You can specify --checkpoint with your own directory or huggingface ID in diffusers format.

Use the --device argument to specify the torch device to use.

The model endpoint is now available at http://127.0.0.1:3013/run_inference via POST request.

Example input (see InferenceInput for the API):

{
  "alpha": 0.75,
  "num_inference_steps": 50,
  "seed_image_id": "og_beat",

  "start": {
    "prompt": "church bells on sunday",
    "seed": 42,
    "denoising": 0.75,
    "guidance": 7.0
  },

  "end": {
    "prompt": "jazz with piano",
    "seed": 123,
    "denoising": 0.75,
    "guidance": 7.0
  }
}

Example output (see InferenceOutput for the API):

{
  "image": "< base64 encoded JPEG image >",
  "audio": "< base64 encoded MP3 clip >"
}

Tests

Tests live in the test/ directory and are implemented with unittest.

To run all tests:

python -m unittest test/*_test.py

To run a single test:

python -m unittest test.audio_to_image_test

To preserve temporary outputs for debugging, set RIFFUSION_TEST_DEBUG:

RIFFUSION_TEST_DEBUG=1 python -m unittest test.audio_to_image_test

To run a single test case within a test:

python -m unittest test.audio_to_image_test -k AudioToImageTest.test_stereo

To run tests using a specific torch device, set RIFFUSION_TEST_DEVICE. Tests should pass with cpu, cuda, and mps backends.

Development Guide

Install additional packages for dev with python -m pip install -r requirements_dev.txt.

  • Linter: ruff
  • Formatter: black
  • Type checker: mypy

These are configured in pyproject.toml.

The results of mypy ., black ., and ruff . must be clean to accept a PR.

CI is run through GitHub Actions from .github/workflows/ci.yml.

Contributions are welcome through pull requests.

排名相邻
同类项目