Commit Graph

61 Commits (main)

Author SHA1 Message Date
ArrowM bbebc41756 Fix postinstall again 2023-03-18 15:12:08 -05:00
d8ahazard 3e8ddce4dd One set of imports to rule them all. 2023-03-08 12:51:24 -06:00
d8ahazard fe0bb0d13c Code Cleanup
Basic reformatting
2023-02-28 15:09:22 -06:00
d8ahazard f8a3513b7c Post-separation anxiety
I'm just kidding, this makes me nothing but giddy.

Bye Felicia!
2023-02-13 08:37:04 -06:00
d8ahazard b24fe0b22c I want to break free...
Add exception handling for all imports if, say, the code were launched by itself, versus as an extension...
2023-02-12 15:57:41 -06:00
d8ahazard d041ab7e0b Move install method back to where it was. 2023-02-11 13:52:30 -06:00
d8ahazard f63a3fc1af Refactor "dreambooth.py", Stricter version checking 2023-02-06 09:44:27 -06:00
d8ahazard f176a06623 Install fix for torch/torch2
Wheee!
2023-02-04 14:09:59 -06:00
d8ahazard 1b30a4a0c7 Remove random crop arg 2023-02-04 13:38:56 -06:00
d8ahazard 87a8714074 Add temp OS check for torch2 2023-02-04 12:59:09 -06:00
d8ahazard 984b4d8abe Add Torch2 flag, Add UI Disable until Model is Selected 2023-02-04 12:57:29 -06:00
d8ahazard 08733a393f Cleanup, Fixes 2023-02-03 15:06:10 -06:00
d8ahazard f700c6b826 FORCE DA TINGS 2023-02-02 15:41:21 -06:00
d8ahazard 269bcc81ee EMA Nonsense 2023-01-31 09:09:28 -06:00
d8ahazard 97f03d93a9 Refactoring and cleanup and stuff, oh my.
Try to eliminate spaghetti by moving items to their own respective files.
Remove unused files, classes, methods.
Continue the good work of wrapping any dependencies on Auto1111 in the dreambooth/shared.py
2023-01-26 13:24:55 -06:00
d8ahazard 806bea75b3 Skip double-loading requirements
For those intrepid enough to override the base requirements file, this will make reloading the app slightly faster.
2023-01-06 18:03:20 -06:00
d8ahazard 20b93e8f6a More massive messy commits!
Add fancy new graph generation showing LR and loss values.
Add LR and loss values to UI during updates.
Fix UI layout for progress bar and textinfos.
Remove hypernetwork junk from xattention, it's not applicable when training a model.
Add get_scheduler method from unreleased diffusers version to allow for new LR params.

Add wrapper class for training output - need to add for imagic yet.

Remove use CPU option entirely, replace with "use lora" in wizard.
Add grad acuumulataion steps to wizard.
Add lr cycles and lr power UI params for applicable LR schedulers.
Remove broke min_learning_rate param.
Remove unused "save class text" param.
Update js ui hints.
Bump diffusers version.
Make labels more useful, auto-adjusting as needed.
Add manual "check progress" button to UI, because "gradio".
2022-12-22 17:27:26 -06:00
d8ahazard b2ab1067fb Finalize LORA implementation, other fixes...
Fix gitignore.
Add epoch to db_config.
Compile lora checkpoints when training.
Remove unused messages and files.
Detect 512 V2 models and save the appropriate config file.
Fix global step counter.
Cleanup startup script to not freak people out.
Use pypi diffusers version, bump transformers version.
2022-12-08 16:28:37 -06:00
d8ahazard 3e69ec8f01 Add LORA, v21 support 2022-12-08 09:42:13 -06:00
d8ahazard 69c4773c99 Update install.py 2022-12-06 10:01:24 -06:00
d8ahazard 39804ebb2e Fix issues on install if repos can't be found. 2022-12-06 07:38:19 -06:00
d8ahazard 945554d565 Update install.py 2022-12-05 18:24:22 -06:00
d8ahazard 9f578527e3 Fixes and Refactoring and Cleanup, Oh My...
Remove annoying message from bnb import, fix missing os import.
Move db_concept to it's own thing so we can preview prompts before training.
Fix dumb issues when loading/saving configs.
Add setting for saving class txt prompts, versus just doing it.
V2 conversion fixes.
Move methods not specifically related to dreambooth training to utils class.
Add automatic setter for UI details when switching models.
Loading model params won't overwrite v2/ema/revision settings.
Cleanup installer, better logging, etc.
Use github diffusers version, for now.
2022-12-05 17:50:24 -06:00
d8ahazard 48f5811792 Work sync 2022-12-04 09:08:08 -06:00
d8ahazard 309a759a88 I'm doing stuff Lori. Thaaaangs.
Add universal bitsandbytes dll for windows user.
Update bnb support files.
V2 compile/extract fixes. Set proper scheduler.
Better state dict rebuilding.
Maybe really maybe fix same checkpoint hash?
Ensure older db configs work.
Fix up sample image generation from diffusers.
Remove "custom" EmaModel, use the real one like Huggingface does.
2022-12-01 22:32:42 -06:00
d8ahazard f604af2a61 Revert text_encoder changes
Revert breaking changes involving disabling text encoder training.
Add option to load sample prompts from a template file for each concept.
Add option to extract EMA weights from model if they exist.
Save global_step value to generated checkpoint.
Bump diffusers version to 0.9.0[torch]
Remove safety_checker and feature_extractor.
2022-11-29 14:02:59 -06:00
d8ahazard 3e4f9cb008 Fixes 2022-11-28 08:35:32 -06:00
d8ahazard 79553df73a
Merge pull request #324 from Akegarasu/main
fix: windows B&B install py site-package path is fixed in venv
2022-11-26 12:57:56 -06:00
d8ahazard 703d838e17 Add torchsde req for SD2.0, Improve logging on startup
Add new requirement added to upstream/main to support Stable Diffusion 2.0 Model(s).

Add safer version checks and logging on app startup.
2022-11-26 09:27:14 -06:00
d8ahazard 0344f9a12c It works(Mostly)
Waay too much to log. I changed a bunch of stuff.
2022-11-25 17:30:10 -06:00
Akiba 438bd5e718
fix: windows B&B install py site-package path is fixed in venv 2022-11-25 13:28:22 +08:00
d8ahazard 8506b3a2f7 Initial commit of superdataset reworking
Create new "SuperDataset" class that can shuffle our images, handle multiple concepts intelligently, and lay the groundwork for resolution bucketing.

Stop being lazy with DreamboothConfig, define all params.

Add new "Concept" Class to neatly encapsulate parameters for individual concepts.

Begin editing the UI to allow training multiple concepts without needing JSON.

Remove "shuffle after epoch" stuff, as it's no longer needed with SuperDataset.
2022-11-23 11:50:05 -06:00
d8ahazard 58bb667b0a Don't break things if first-time launch. 2022-11-20 17:45:47 -06:00
d8ahazard 31e8595eab Add checks for xformers and CPU only training, better status in the UI, console logging.
If xformers is installed and a cmd flag set to use it, nag the user before training that they need to enable fp16 and 8bit adam.

If user is training on CPU only, tell them they need to disable fp16 and adam.

Ensure warning messages are REALLy shown in the UI.

Better logging of installed features on launch.
2022-11-20 14:17:30 -06:00
d8ahazard dd2d9aab1a Fix transformers issues with versions greater than 4.19
Monkey-patch out the offending method and bump the torch version to celebrate!
2022-11-18 10:44:15 -06:00
d8ahazard e66b34b925 Fix adam (for real) 2022-11-16 17:33:43 -06:00
d8ahazard bc023c8fc8 Sometimes, I think I'm so smart I'm stupid. Or is it the other way around? 2022-11-16 12:47:35 -06:00
d8ahazard 743725b0ee Revert "Merge pull request #229 from dathide/patch-1"
This reverts commit 23af331535, reversing
changes made to 1ccdc41055.
2022-11-16 12:12:30 -06:00
d8ahazard 23af331535
Merge pull request #229 from dathide/patch-1
Switch from launch to subprocess in install.py
2022-11-16 09:54:28 -06:00
d8ahazard c5d4d5a09d Fix missing ADAM files 2022-11-16 08:29:04 -06:00
dathide 441f8c955e
Switch from launch to subprocess in install.py
No longer use launch because the officially recommended way to invoke subprocesses is through subprocess: https://docs.python.org/3/library/subprocess.html
2022-11-15 23:48:36 -07:00
d8ahazard bc8c9b8779 Cleanup Installer
Only bump torch version on windows where we need it.
Only copy 8bit adam files if needed.
2022-11-15 12:05:36 -06:00
d8ahazard bc0dde030b Keep logging, bnb copy routines. 2022-11-14 10:33:53 -06:00
d8ahazard 4addc36900 Add option to skip install on launch (Offline mode) 2022-11-14 10:19:30 -06:00
152334H 0f6d7d89ac check for `TORCH_COMMAND` 2022-11-12 13:20:10 +00:00
d8ahazard 3a452da3cd Add example scripts for install, create "complete" requirements.txt 2022-11-11 08:51:36 -06:00
d8ahazard 2f5ed1a7dc Update install.py 2022-11-10 09:47:44 -06:00
d8ahazard d128e371e8 Fix overzealous install update 2022-11-10 08:14:40 -06:00
d8ahazard d16f6cb5f9 Fix spaces in paths?
Look ma, no spaces!

Because apparently, we don't need the full path to requirements.txt
2022-11-09 16:23:29 -06:00
d8ahazard 08394f9831 Fix JSON loading, potential Torch issues on install 2022-11-09 13:41:34 -06:00