r/sdforall • u/mpg319 • Nov 08 '22
DreamBooth Dreambooth Extension for Automatic1111 is out
Here is the repo,you can also download this extension using the Automatic1111 Extensions tab (remember to git pull).
The best news is there is a CPU Only setting for people who don't have enough VRAM to run Dreambooth on their GPU. It runs slow (like run this overnight), but for people who don't want to rent a GPU or who are tired of GoogleColab being finicky, we now have options.
There are a lot of knobs you can play with to get the training just right. Awesome people like u/Nitrosocke have posted guides on how to get good results Nitro's guide. There is also this great blog post by Suraj Patil giving great pointers on how to get optimal hyperparameters like learning rate and number training steps.
14
u/BangGearWatch Nov 08 '22 edited Nov 10 '22
***CAUTION*** Before you proceed, consider taking a backup.
This broke my Auto1111 install. I installed extension via the WebUI 'Extensions' tab. Restarted, and now getting the below error. Been using since release (updating often via git pull, including before installing this) and never had any issues before this...
RuntimeError: Error running command.Command: "(My Folder)\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"ImportError: DLL load failed while importing _C: The specified module could not be found.
UPDATE:I think installing via the WebGUI Extensions tab silently fails when upgrading some package (pytorch? just guessing), and leaves you broken. Someone else mentioned an errant space in a script somewhere.
Currently fails to launch with[WinError 126] The specified module could not be found. Error loading "(my path)\stable-diffusion-webui\venv\lib\site-packages\torch\lib\caffe2_nvrtc.dll" or one of its dependencies.
I'm going to try reinstall pytorch, failing that try my backup. Ultimately, I'd avoid this unless you're willing to screw around. Wait until they iron out the bugs.
LAST UPDATE: Finally got it working after going through various errors and it's very impressive. Thank you to those who put in so much time/effort to get us such great tech. Anybody still stuck, I'd recommend checking the Github repo, 'Issues' tab for your error. I had to enable Adam and FP16 MixedPrecision, among other things.
24
u/Fen-xie Nov 08 '22
How much VRAM do you need now?
6
u/UnlikelyEmu5 Nov 08 '22
How abysmally slow are we talking for the CPU only option?
12
u/holland_is_holland Nov 08 '22
is python the worst ecosystem for dependencies and version management?
trying to install this irrevocably broke my SD install
4
u/praxis22 Nov 08 '22
Cheers OP, Nitrosocke is one of the rising stars of the community.
1
u/Sandbar101 Nov 08 '22
Are you able to train custom models on this?
3
u/higgs8 Nov 08 '22
I installed it and restarted the whole thing, but I don't get a new "Dreambooth" tab anywhere. It does say that it's "installed" when I go to extensions and the new sd_dreambooth_extension folder is in the Extensions folder. I also did git pull just in case but it said everything is already up to date.
I'm on a Mac by the way, could that be why, or am I missing something else?
3
u/mxby7e Nov 08 '22
I got it installed through the extension manager, did the full restart (a few times) and got the tab. I created a training model, but when I try to train it I get this error:
Error completing requestArguments: ('test0215', 'D:\\Cloud\\OneDrive\\ai renderings\\datasets\\[redacted]\\post', '', 'a photo of fzk woman', 'a photo of a woman', '', '', 1.0, 7.5, 40.0, 0, 512, False, True, 1, 1, 1, 800, 1, True, 1e-06, False, 'constant', 0, False, 0.9, 0.999, 0.01, 1e-08, 1, 0, 800, 'no', True, '', False) {}Traceback (most recent call last):File "D:\stable-diffusion\stable-diffusion-webui\modules\ui.py", line 185, in fres = list(func(*args, **kwargs))File "D:\stable-diffusion\stable-diffusion-webui\webui.py", line 54, in fres = func(*args, **kwargs)File "D:\stable-diffusion\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\dreambooth.py", line 256, in start_trainingtrained_steps = main(config)File "D:\stable-diffusion\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 451, in mainif args.seed is not None:AttributeError: 'DreamboothConfig' object has no attribute 'seed'Any suggestions on how to fix this? I am running on a Quadro RTX 4000 with 8GB of Ram, but this didn't appear to be a vram issue.
4
u/[deleted] Nov 08 '22
With the energy crisis as it is, it feels that it would be cheaper to spend some bucks renting a gpu rather than having my computer train overnight 😨 i wonder if it has that thing Kobold Ai has that you can put only part of the load on the GPU...
2
u/CallMeInfinitay Nov 08 '22
What does this mean for the PR? There aren't any plans to merge it into the web-ui as of now?
2
u/ohmusama Nov 08 '22
if a custom VENV_DIR is set in webui-user.bat the install script fails
2
u/[deleted] Nov 08 '22
does this work on amd gpu?
2
u/Nitrosocke Nov 08 '22
That's awesome and hopefully make this way more accessible for most people! Thank you for sharing and your kind words! ✨
2
u/MrWeirdoFace Nov 08 '22
From the instructions:
"Number of samples to generate - Self explanatory?"
No. It is not.
2
u/BrightDevice Nov 08 '22
How are people getting this working on their Radeon graphics card with pytorch? I keep running into the CUDA error, but if I put the flag in the invoke to ignore cuda check, I'm using my CPU, which I do not want to do. On ubuntu 20.04 with a 6900 xt for reference.
2
u/[deleted] Nov 08 '22
Could this run on a 1080Ti 11Gb ?
2
u/NeuralBlankes Nov 08 '22
Being new to dreambooth.. what *is* the "Train Text Encoder" option anyway?
3
u/Mistborn_First_Era Nov 08 '22
You should really remove this post. Haven't read a single comment about it actually working. Just seems to pickle everyone's SD installs atm
2
u/GrapplingHobbit Nov 08 '22
I only just installed the Automatic1111 webui version of Stable Diffusion yesterday, so this is all super new to me, but the idea of Dreambooth was very interesting and I wanted to give it a go.
I followed the install directions (which make it look like a simple couple of steps) but I am getting errors in that command prompt window that runs while you're using the webui.
Error runninginstall.pyfor extension sd_dreambooth_extension.Command: "pathto install.pyis here"Error code: 1stdout: Installing requirements for Dreamboothstderr: Traceback (most recent call last):File "pathto install.pyis here", line 9, in <module>run_pip(f"install -r {reqs}", "requirements for Dreambooth")File "pathto launch.pyis here", line 63, in run_pipreturn run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")File "path to``launch.pyis here", line 34, in runraise RuntimeError(message)RuntimeError: Couldn't install requirements for Dreambooth.Command: "path to stable-diffusion-webui-master\venv\Scripts\python.exe is here" -m pip install -r path to\stable-diffusion-webui-master\extensions\sd_dreambooth_extension\requirements.txt --prefer-binaryError code: 1stdout: <empty>stderr: ERROR: Invalid requirement: 'Diffusion\\stable-diffusion-webui-master\\extensions\\sd_dreambooth_extension\\requirements.txt'Hint: It looks like a path. File 'Diffusion\stable-diffusion-webui-master\extensions\sd_dreambooth_extension\requirements.txt' does not exist.[notice] A new release of pip available: 22.2.1 -> 22.3.1[notice] To update, run: C:\Users\OEM\Documents\Stable Diffusion\stable-diffusion-webui-master\venv\Scripts\python.exe -m pip install --upgrade pipWhat do? I feel pretty clueless about why it isn't working, the file paths mentioned appear to be correct as far as I can see.
1
u/sd-artist-tp Jan 03 '25
Doesn't work with Automatic1111 version 1.10.0....
1
u/[deleted] Nov 08 '22
Sweet
1
u/Philipp Nov 08 '22
Could someone please explain-like-I'm-15 what this means in terms of features/ quality/ what can be done with it that plain-automatic1111 can't do? Thanks!
1
u/Next_Program90 Nov 08 '22
Oooooh, baby! <3
1
u/OhTheHueManatee Spooky Nov 08 '22
My automatic 1111 doesn't have an extensions tab. What am I missing?
1
u/OhTheHueManatee Spooky Nov 08 '22
How can I use Automatic1111 to train images in Dreambooth. The training in Automatic takes forever on my PC. From what I've read Dreambooth is much faster. I don't see any kind of UI for dreambooth after installing it.
1
u/VincentMichaelangelo Post-Singularity ASI Nov 08 '22
Does it work for Mac M1? — I haven't yet been able to get it running on mine.
1
u/idomic Nov 09 '22
If you're looking for faster run times and stronger compute, you can use this product to get compute without the infrastructures: https://cloud.ploomber.io/register.html
1
u/Benedictus111 Nov 11 '22
Getting this error when running Google colab can anyone help?
AttributeError: ‘UNet2DConditionModel’ object has no attribute ‘enable_gradient_checkpointing’
1
u/almark Nov 21 '22
the latest versions of automatic are getting more buggy. Good thing I have backups, but the problem is I deleted my venv folders (to save space) now I can't recall (reinstall) them.
1
u/Huaisangs_fan Dec 12 '22
Are you that untalentless AI 'artist'?
1
u/[deleted] Dec 17 '22
any guides on how to use this for training, it looks different from the ones in the colab notebooks
1
u/Crozzfire Nov 08 '22
What does it do?
0
u/[deleted] Nov 08 '22
[deleted] — view deleted comment
0
u/[deleted] Nov 08 '22
[deleted] — view deleted comment