lks-ai / ComfyUI-StableAudioSampler

The New Stable Diffusion Audio Sampler 1.0 In a ComfyUI Node. Make some beats!
215 stars 14 forks source link

ComfyUI-StableAudioSampler

The New Stable Audio Open 1.0 Sampler In a ComfyUI Node. Make some beats! image

An Example I Pasted Together

In this workflow, I got random cfg_scale, sigma_min and step values making variations on the same 16 beats; same prompt and seed. VOLUME WARNING!

https://github.com/lks-ai/ComfyUI-StableAudioSampler/assets/163685473/5f43db75-cc35-47f3-999b-6f65f91420eb

Caveats

Installation

Download the Model and Config

  1. Go to Stable Audio Open on HuggingFace and download the model.safetensors and model.config.json files.
  2. Place the files in the models/audio_checkpoints folder. If you don't have one, make one in your comfy folder.
  3. Open Comfy and StableAudioLoader will see your model and config

With a HuggingFace Token

  1. Make sure you have your HF_TOKEN environment variable for hugging face because model loading doesn't work just yet directly from a saved file
  2. Go ahead and download model from here for when we fix that Stable Audio Open on HuggingFace
  3. Make sure to run pip install -r requirements.txt inside the repo folder if you're not using Manager
  4. It should just run if you've got your environment variable set up

There will definitely be issues because this is so new and it was coded quickly so we couldn't test it out.

This is not an official StableAudioOpen repository.

Current Features

Example Workflows

Exploring Same Prompt and Seed

The part I use AnyNode for is just getting random values within a range for cfg_scale, steps and sigma_min thanks to feedback from the community and some tinkering, I think I found a way in this workflow to just get endless sequences of the same seed/prompt in any key (because I mentioned what key the synth lead needed to be in).

With the new save prefix templating, it makes it easy to just look at the file and know what settings (since wav doesn't have PNGinfo)

Roadmap and Requested Features

Keeping track of requests and ideas as they come in:

Error: progressbar

If you get the progressbar error, you can use our new utility from the latest update.

cd ComfyUI/custom_modules/ComfyUI-StableAudioSampler
python util_discrepancies.py progressbar

You will see something like this... Screenshot from 2024-06-13 13-02-30 In this screenshot, you see protobuf but that is only because I don't have version issues with progressbar. Note: If I install one of those version suggestions, StableAudioSampler should work, but at the same time, it might make other packages not work.

Contributions

We are very open to anyone who wants to contribute from the open source community. Make your forks and pull requests. We will build something cool. If it's already on the roadmap, chances are we're already working on it, so check in with us. We will start a dev branch.

Feature Requests

If you have a request for a feature, open an issue about it and it will be seen.

Happy Diffusing!