enlyth / sd-webui-riffusion

Riffusion extension for AUTOMATIC1111's SD Web UI
MIT License
195 stars 23 forks source link

Added option for cropping samples to a set width or detect it from beats #26

Closed jahu00 closed 1 year ago

jahu00 commented 1 year ago

I've added an option for cropping samples (actually images right before being converted into WAV) in the Riffusion tab. This can be useful when samples (like the ones produced by prompt travel) have excess length (appears to be most of the time for me). Cropped samples join more seamlessly.

There are two main options for cropping samples:

image Image generated by the visualization (after getting settings just right).

This could be further improved by checking local maxima instead of just threshold (it's somewhat visible on the image, beats are detected when threshold is satisfied rather on the peak). Also, it might be possible to automate finding some of the settings (like horizontal slice or threshold).

If the code needs cleaning up, leave me a comment.

enlyth commented 1 year ago

Hey, thanks for all the effort.

I've invited you as a collaborator on the repo, since I don't have time right now to manage it or review PRs. Feel free to contribute what you think can improve it

jahu00 commented 1 year ago

Ok, I think there other small improvements that can be made to the batch tool. I'll try doing those next,