Commit Graph

62 Commits

Author SHA1 Message Date
Hayk Martiros 6a5f572374 Add a test that verifies ruff, black, and mypy all pass
This fels good!

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 52bec9575b Update python project configuration files
* Adds a pyproject.toml
* Update requirements and dev requirements
* Add a CITATION file
* Add details to the README

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 3ab5087c7a Add test for image_util
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 8bdc92cc5a Add a unittest base class and some test data
Topic: clean_rewrite
2022-12-26 17:47:11 -08:00
Hayk Martiros b7cdb872a7 Rewrite the codebase to be high quality
This PR overhauls the codebase to move it from a hack to a proper
foundation to build upon.

Some of the changes:
 * Refactor code into modules and classes
 * More heavily lean on pydub as a great audio library
 * Introduce ruff, black, and mypy and make them pass
 * Test suite
 * Apple MPS support (with CPU fallback for unsupprted stuff)
 * Support stereo spectrogram images (prototype)
 * Support embedding parameters into image metadata as EXIF
 * Add tools for easily comparing parameters and running albations
 * Improve the readme

Topic: clean_rewrite
2022-12-26 17:42:46 -08:00
Hayk Martiros cae8a3892e Merge branch 'main' of https://github.com/hmartiro/riffusion-inference into main 2022-12-23 05:08:51 +00:00
Hayk Martiros 8349ccff59 Make traced unet optional and support custom checkpoints 2022-12-23 05:08:37 +00:00
Hayk Martiros 5eddf347c3
Merge pull request #34 from riffusion/readme/improve_install
Improve installation instructions
2022-12-22 20:51:48 -08:00
Hayk Martiros 19e31790da
Improve installation instructions 2022-12-22 20:51:27 -08:00
Hayk Martiros 40e1e51c6a
Change citation to article 2022-12-18 23:13:08 -08:00
Hayk Martiros 01e8a4774a
Merge pull request #16 from jagilley/main
Add image_from_spectrogram to audio.py
2022-12-18 22:58:01 -08: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
Jasper 1c5caf77ac
Convert to RGB 2022-12-16 16:26:46 -06:00
Jasper 9ab8c0f105
added image_from_spectrogram to audio.py 2022-12-16 16:02:12 -06:00
Hayk Martiros aad110e53b
Merge pull request #6 from ilayluz/patch-1
Make the example input and output valid JSON strings
2022-12-15 13:47:12 -08:00
ilayluz 76d47fc93f
Make the example input and output valid JSON strings 2022-12-15 21:28:21 +02:00
Hayk Martiros 423ef6cd03
Update README.md 2022-12-14 21:15:02 -08:00
Hayk Martiros e3a2e67215 Merge branch 'main' of https://github.com/hmartiro/riffusion-inference into main 2022-12-14 08:20:35 +00:00
Hayk Martiros cb518c548a Prototype prompt reweighting 2022-12-14 08:20:19 +00:00
Seth Forsgren e8ed095396 adding seed images 2022-12-13 23:33:52 -08:00
Seth Forsgren 387b4da8ff updating mask image directory 2022-12-13 17:07:49 -08:00
Seth Forsgren 2fea921515 debug code 2022-12-13 16:21:39 -08:00
Hayk Martiros 55651db0fc to cuda 2022-12-13 06:55:07 +00:00
Hayk Martiros 79239a719d make server work 2022-12-13 06:43:46 +00:00
Seth Forsgren 6bee23d9b6 Merge branch 'main' of https://github.com/hmartiro/riffusion-inference 2022-12-12 22:16:53 -08:00
Seth Forsgren 37d975cea8 setting default checkpoint to hosted model 2022-12-12 22:16:45 -08:00
Seth Forsgren f3201c8630
Update README.md 2022-12-12 22:06:14 -08:00
Seth Forsgren afa49af2b0 traced unet and disabled autocast, adding baseten.py 2022-12-12 22:01:47 -08:00
Seth Forsgren d601c5e2bc Revert "Create chill_soul_1.png"
This reverts commit 481dde028e.
2022-12-12 21:47:38 -08:00
Hayk Martiros aac93eb80e
Update README.md 2022-12-12 19:40:21 -08:00
Hayk Martiros 7630f02802
Update README.md 2022-12-12 19:37:41 -08:00
Hayk Martiros 6c99dba1c8
Update README.md 2022-12-12 19:24:24 -08:00
Hayk Martiros 26c9828e69 readme tweak 2022-12-13 02:55:40 +00:00
Hayk Martiros 52af17d607 Merge branch 'main' of https://github.com/hmartiro/riffusion-inference into main 2022-12-13 02:47:52 +00:00
Hayk Martiros ecf6d64732 Add license 2022-12-13 02:47:48 +00:00
Seth Forsgren 481dde028e Create chill_soul_1.png 2022-12-01 12:56:02 -08:00
Hayk Martiros 08864db437 Add some masks 2022-11-28 02:35:09 +00:00
Hayk Martiros ae34fb388e Add support for cache (still disabled) 2022-11-28 00:06:12 +00:00
Hayk Martiros 511defae99 Provide clip duration and encode base64 prefix type 2022-11-27 21:55:42 +00:00
Hayk Martiros 7f27705f81 save JPEG instead of PNG 2022-11-26 19:24:50 +00:00
Hayk Martiros cd4c00b12e Merge branch 'main' of https://github.com/hmartiro/riffusion-inference into main 2022-11-26 06:49:52 +00:00
Hayk Martiros 09c789811f Add a step towards SSL support 2022-11-26 06:49:25 +00:00