lks-ai / ComfyUI-StableAudioSampler

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

Saved filename does not increment #15

Closed NetAndif closed 2 weeks ago

NetAndif commented 2 weeks ago

It always overwrites the file

NetAndif commented 2 weeks ago

However, thanks for creating this node collecton. I appreciate it as it basically works for me.

kft334 commented 2 weeks ago

Looks like that is the intent. Only auto-increment batch samples, and overwrite the files on new batch. Perhaps there could be a switch to always auto-increment rather than replace existing files. I prefer to save all the files and manually delete them. And saving should have a dedicated node and be decoupled from the sampler if we're going to have any post-sampling nodes (source separation, filters, etc.).

lks-ai commented 2 weeks ago

I added a new feature to this which I just pushed. I'm really trying to nail audio2audio in this update but it is a bit of a pain. Anyway, the new feature is as such...

Prefix Templating

image

The _0000 at the end of the filename is for batches, but I'm still working on getting that right.

lks-ai commented 2 weeks ago

https://github.com/lks-ai/ComfyUI-StableAudioSampler/assets/163685473/a930b798-b25a-492c-8b03-d4fd27b78491

kft334 commented 2 weeks ago

Temp is not created because this line was only duplicated but not modified. os.makedirs(ACKPT_FOLDER, exist_ok=True)

FileNotFoundError: [Errno 2] No such file or directory: 'temp/stableaudiosampler.wav'

How did you get 2:47 of seamless audio from 8 second clips btw?

lks-ai commented 2 weeks ago

Temp is not created because this line was only duplicated but not modified. os.makedirs(ACKPT_FOLDER, exist_ok=True)

FileNotFoundError: [Errno 2] No such file or directory: 'temp/stableaudiosampler.wav'

How did you get 2:47 of seamless audio from 8 second clips btw?

Just pushed the fix, thanks for looking out!

So, if you look at the workflow in the video, it shows my settings. I just posted the workflow here.

The trick was in making it produce 8 seconds of audio in the Pre-Conditioning node and then in the Prompt I asked for specifically 120BPM. 120 beats in 60 second is two beats per second. If I ask for 8 seconds that is 16 beats.

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)

kft334 commented 2 weeks ago

I didn't realize that it followed the prompt that well. This is much smoother than what Riffusion was able to do even with blending/inpainting the spectrograms.