Commit Graph

68 Commits

Author SHA1 Message Date
Hayk Martiros a861b48232 Streamlit fixes and batch text to audio with multiple models
Topic: batch_text_with_multiple_models
2023-04-11 21:36:09 -07:00
Hayk Martiros 8d44cbbc64 Add py.typed for mypy use
Allows mypy to type check when used in other packages via PEP 561.
2023-03-26 17:05:49 -07:00
Hayk Martiros 754c9f8f64 Make it possible to run the playground directly
It can now be run with:

    python -m streamlit run riffusion/streamlit/playground.py
    python riffusion/streamlit/playground.py
    python -m riffusion.streamlit.playground

Which adds a ton of flexibility.
2023-03-26 16:37:13 -07:00
Hayk Martiros a0f12d80e2 Upgrade playground app to Streamlit 1.18+
The first change was using the new non-experimental cache decorators,
but then I decided to refactor to get rid of using the streamlit pages
feature and instead have my own dropdown. This allows for more control
to fix a page layout issue that popped up with this version.
2023-03-26 16:25:47 -07:00
Hayk Martiros 0e6d7436f4 Batch fix
And support 20khz in image to audio playground UI
2023-02-08 02:46:55 -08:00
Hayk Martiros 38cce7ab00 Support custom checkpoints in text_to_audio
Also have a toggle for 20khz spectrogram mode

Topic: playground_custom_checkpoints_text_to_audio
2023-01-29 14:32:19 -08:00
Hayk Martiros 45d36a32a6 Add audio_to_image_batch and sample_clips_batch
Topic: batch_cli_commands
2023-01-28 16:52:56 -08:00
Hayk Martiros a82317356c [Playground] Tune parameters
Topic: tune_params_1
2023-01-16 18:59:09 -08:00
Hayk Martiros 66b0f03997 [Playground] Change interpolation defaults
Topic: interpolation_defaults
Reviewer: sethforsgren
2023-01-16 18:27:21 -08:00
Hayk Martiros 3439aae76d [Playground] Add magic mix to audio2audio
Allows for better preserving structure with audio to audio.

Topic: magic_mix
2023-01-16 17:37:13 -08:00
Hayk Martiros 2fc9b8d379 Lock to prevent concurrent access to model pipeline in playground
This should avoid the most basic conflict with multiple users on
the app at one time. Seems to work with initial testing.

Topic: pipeline_lock
2023-01-16 16:46:07 -08:00
Hayk Martiros e832b92c43 Sample clips can save images
Topic: sample_clips_save_images
2023-01-15 23:48:20 -08:00
Hayk Martiros b45910709c Add initial scheduler support
Add the ability to choose schedulers, at least for a subset of the pipeline
configurations. Allows configuring for text to audio and audio to audio
in the sidebar. Currently not used for interpolation, aka the riffusion
pipeline.

Topic: schedulers_v0
2023-01-14 18:47:01 -08:00
Hayk Martiros 75c67e1ea5 Audio download buttons and proper extension handling across the app
* Add buttons that download audio segments with the proper name, and display the name
 * Add a helper that displays the audio bar and the download button
 * Create a sidebar widget helper for choosing the output extension
 * Use this extension widget in all pages to dicate output types
 * Add a streamlit session state counter object to help with reruns
 * Improve UI in various places with small fixes

Topic: audio_download_extensions_ui
2023-01-14 14:16:07 -08:00
Hayk Martiros 8b07a5a45f Audio to audio handles interpolation within it
Kill the separate page.

Topic: audio_to_audio_interpolation
2023-01-14 11:45:45 -08:00
Hayk Martiros 40bf61e949 Audio to audio with interpolation
Topic: audio_to_audio_interpolation
2023-01-14 11:45:45 -08:00
Hayk Martiros ca72f418b6 Text to audio supports multiple clips
Topic: text_to_audio_multiple_riffs
2023-01-08 17:04:52 -08:00
Hayk Martiros a4784bb4dc Recombine audio
Add an option in the splitter to recombine stems at the end.

Topic: recombine_audio
2023-01-08 14:59:36 -08:00
Hayk Martiros 8e87c133c8 Audio splitting with demucs hybrid transformer model
Topic: audio_splitter_transformer
2023-01-07 20:36:43 +00:00
Hayk Martiros 6b02e98e35 Help text for app
Topic: app_help_text
2023-01-06 09:26:39 -08:00
Hayk Martiros 7325bfa143 Linter fixes
Topic: audio_to_audio
2023-01-06 09:19:02 -08:00
Hayk Martiros b58982d2a6 Add help text to streamlit app
Topic: audio_to_audio
2023-01-06 09:19:02 -08:00
Hayk Martiros a88046615b basic audio to audio fixes
Topic: audio_to_audio
2023-01-06 09:19:02 -08:00
Hayk Martiros 83b2792b27 Audio to audio improvements (some WIP)
Topic: audio_to_audio
2023-01-06 09:19:02 -08:00
Hayk Martiros 503c5e4e84 Audio to audio
Topic: audio_to_audio
2023-01-06 09:19:02 -08:00
Hayk Martiros 61757b3d95 Audio to audio
Topic: audio_to_audio
Relative: audio_splitter
2023-01-06 09:19:02 -08:00
daanelson 2695af9706 cog using common load fxn 2023-01-05 00:01:55 -08:00
Hayk Martiros 45d55e986c Cog integration
Support hosting on Replicate using the cog interface.

Continuation of: https://github.com/riffusion/riffusion/pull/26

Topic: cog_integration
2023-01-05 00:01:55 -08:00
Hayk Martiros bb5330699c Rename interpolation page
Topic: interpolation_rename
2023-01-04 22:54:33 -08:00
Hayk Martiros da177ec424 Audio splitter
Topic: audio_splitter
2023-01-04 22:49:29 -08:00
Hayk Martiros fae3e2c918 Add note to SpectrogramParams about torchaudio docs
Closes: #30

Topic: params_docs
2022-12-29 11:46:40 -08:00
Hayk Martiros ce8744897b Convert to three-channel if needed in spectrogram_from_image
Closes: #51

Topic: convert_three_channel
2022-12-29 11:33:09 -08:00
Hayk Martiros 0610a45e80 Improve interpolation playground
Topic: playground_improvements
2022-12-27 07:58:06 -08:00
Hayk Martiros f7288f8cd3 Disable compression by default, too slow
Topic: disable_compression
2022-12-27 07:57:52 -08:00
Hayk Martiros 152192006e Add several streamlit demo pages
Topic: streamlit_app
2022-12-27 00:31:29 -08:00
Hayk Martiros 1335afb72f Add batch text to audio processing
Topic: streamlit_app
2022-12-27 00:24:40 -08:00
Hayk Martiros 420674148a Improve text to audio
Topic: streamlit_app
2022-12-26 21:03:30 -08:00
Hayk Martiros 39dc247a1d Streamlit app for interactive use of the model
Topic: streamlit_app
2022-12-26 20:01:27 -08:00
Hayk Martiros e48ec2e103 Enable ruff import sorting
Topic: import_sorting
2022-12-26 18:12:02 -08:00
Hayk Martiros d820e1fecf Fix minor errors
Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros dc4e2d8d64 Command line interface for common operations, plus tests
Add riffusion.cli tool for common operations. Add a test for
each one.

Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros cbf473216b Greatly simplify the server and baseten integration
With the new clean module structure, make it so the two servers
share all the important code. This makes the baseten integration
very small and simple, and paves the way for more integrations.

Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 40a799a3d3 Remove old audio module
No longer needed, it's broken up into cleaner pieces.

Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 2fb1153ec8 Refactor RiffusionPipeline
* Bunch of cleanup and typing
 * Move prompt_weighting to be marked as external
 * Add helpers for loading the checkpoint and traced unet

Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 4c78e1a228 Add SpectrogramImageConverter and test
This class converts between spectrogram images and audio. Uses
SpectrogramConverter internally, which only deals with tensors.

Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 7d0e08711c Add SpectrogramConverter class and test
This class is a helper to convert between spectrogram tensors and
audio.

Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 539aafde3e Pull out basic utilities into util package
Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 671cb5f05e Add spectrogram params
Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros 8349ccff59 Make traced unet optional and support custom checkpoints 2022-12-23 05:08:37 +00:00
Jasper 66dbdb16ca
Scale by max value
Scale by max value to allow for processing 24- and 32-bit wavs
2022-12-16 22:12:39 -06:00