Does anyone have a layman's explanation for the difference between Dreambooth and real fine-tuning? Is it mainly that proper training preserves the model to a far better degree, whereas Dreambooth is a shortcut that trashes your model?
Fingers crossed that a 12GB local version comes out soon.
Thanks! yep been watching this as well, was hoping to see more people share their experience and results. I’m trying to get my dataset together to test this with a few thousand images. Most of the ai captions are only semi accurate, so going through them but it is a slow process.
Just surprised this isn’t a more popular method than dreambooth as the process sounds more defined.
Please give an update if you get this working. All .ckpt's I got from this method only generated noise, much like OP's Van Gogh model. (Which is a shame since this is the only real finetuning guide I've seen so far)
Will do, I’ll be cutting my dataset back for a trial run as it’s the most time consuming part so far, but I suspect even if it does work, it would obviously be fine tuned to a specific art style etc. so I’d suspect it wouldn’t be useful as a general model. Considering the one uploaded to hugging face is under 500mb, I’m guessing data is removed in the process?
Do you think running a non-dreambooth finetune with a "a woman doing acrobatics" as a default prompt for all images would result in a better output? Or would this be equivalent to dream booth and I have to do the work writing prompts for all my 2000 training pictures?
It might work better, I'm not quite sure unfortunately. It definitely works better with different prompts for each image (this can be done by using clip, instead of manually renaming the files), but I'm not sure if it would be more effective then dreambooth. Up to you to try it if you want I guess!
Automatic's UI can automatically CLIP describe a whole folder of picture and setting their filename to that, but it also prefixes the pictures with a number so there's no problem if two pictures have the same prompt/filename. If I remember the original training papers CLIP ignores nonsensical stuff like a numbered prefix anyway, but I also try to extend your script so that it's able to remove the firx X characters of a filename.
I’m not a programmer so my question might be uninformed: would this work better than merging Dreambooth models to recognise separate individuals in the same image?
Lorem ipsum dolor sit amet consectetur adipiscing, elit mi vulputate laoreet luctus. Phasellus fermentum bibendum nunc donec justo non nascetur consequat, quisque odio sollicitudin cursus commodo morbi ornare id cras, suscipit ligula sociosqu euismod mus posuere libero. Tristique gravida molestie nullam curae fringilla placerat tempus odio maecenas curabitur lacinia blandit, tellus mus ultricies a torquent leo himenaeos nisl massa vitae.
You have to set the env variable CUDA_HOME to the correct path. If you have cuda installed in your system that would probably be "/usr/local/cuda-xx" or maybe in "/opt/". If you are using anaconda you might need to install cudatoolkit-dev along with the correct version of cudatoolkit and cudnn, and set CUDA_HOME to the path where the nvcc compiler is installed.
/usr/local/lib/python3.7/dist-packages/diffusers/utils/outputs.py in __getitem__(self, k)
86 if isinstance(k, str):
87 inner_dict = {k: v for (k, v) in self.items()}
---> 88 return inner_dict[k]
89 else:
90 return self.to_tuple()[k]
KeyError: 'sample'
If I let it finish anyway then running inference gives the same KeyError exception. What could be the reason for this? My dataset consists of 29.000 well prepared square 512x512 images.
Thanks, that makes sense. I managed to start training on local Windows (which has no DeepSpeed support, so I had to uncomment the torch optimizers beneath the DS initialization)
And after training for a minute I get: No such file or directory: '/tmp/dontusethisplease'
This is obviously a placeholder name, but I'm unsure what it means, or if there's a way I shouldn't be triggering it.
I recommend at least 1000 or so. More images is always better. If all your images have filenames that correspond to what the image is, then it should all be fine. This isn't meant to be used to finetune the model to a specific subject, dreambooth works best for that. Instead, this is designed for training with large datasets, to produce models similar to things like waifu diffusion.
I see. Another question. If I have a lot of outputs of my personal things. If I just rename every single one of them to drawing,jpg, drawing (2),jpg, drawing (3),jpg , will be useful? Or do I have to use different renames?
So basically, this may be the way to train a model for a particular style as you did with Van Gogh. I believe Studio Ghibli model was done like this ? Is there an implementation of this for Automatic1111 ?
Thanks for sharing. So, if I wanna for instance train the whole model into let's say a group of subjects that are actors of a movie, because textual inversion would affect not related subjects on model. Should I add regularization images to the training dataset to prevent all model stays affected like in your Van Gogh's example?
Regularization images might help, although I have not tested it as of yet. It should work training multiple characters, as long as each image's prompt mentions the character it is of.
Does it only nudges the existing model to interpret normal prompts without tokens more in the direction of the provided training data, without adding the training data into the space of the checkpoint?
Man where where you 4 days ago when I started finetuning my own model! As a complete noob I spent a whole evening working through the incomplete instructions Lambda posted w/ their Pokemon model. Thanks for this! I'll definitely check this out tonight since I'm still working on my model!
What is with all you people who have no posts in this sub for the last month suddenly telling everybody to leave and claiming to be the true voice of this sub?
I've been posting in this sub since the start and also follow Emad on Twitter. I read up on what happened and it's bullshit. SD should have created an official sub, not hijack this one. There are a number of new SD subreddits now. I think the point is we need to diversify as a community to prevent such takeovers in the future.
7
u/eatswhilesleeping Oct 11 '22
Does anyone have a layman's explanation for the difference between Dreambooth and real fine-tuning? Is it mainly that proper training preserves the model to a far better degree, whereas Dreambooth is a shortcut that trashes your model?
Fingers crossed that a 12GB local version comes out soon.
7
u/CaptainAnonymous92 Oct 11 '22
Does this work on the free version of colab?
2
u/UnsubFromRAtheism Oct 12 '22
This looks really great. What data needs to be in the CSV? Two columns, name and prompt?
2
u/BlinksAtStupidShit Oct 29 '22
Any more info on this? Anyone got results to share? I’m trying to get enough time together to trial this be dreambooth
2
u/NetyashaRoozi Nov 04 '22
I can't seem to get any samples to generate while training. I just get
---------------------------------------------------------------------------KeyError Traceback (most recent call last)<ipython-input-14-a21f2aaa4b20> in <module>87 with out:88 print("Prompt:", x[0])---> 89 display(pipe(x[0])["sample"][0])90 global_i += 191 if global_i >= train_steps:/usr/local/lib/python3.7/dist-packages/diffusers/utils/outputs.py in __getitem__(self, k)86 if isinstance(k, str):87 inner_dict = {k: v for (k, v) in self.items()}---> 88 return inner_dict[k]89 else:90 return self.to_tuple()[k]KeyError: 'sample'I also get the KeyError: "sample" error when just trying to generate any sample
2
u/jochemstoel Nov 04 '22
Good job posting a notebook that doesn't work.
3
u/[deleted] Oct 11 '22
Woah thanks! Was currently trying to implement a fine tune script that is able to run on collab based on the pokemon thing too
Perhaps you know by chance if fine-tuning is actually better than dream booth for my use case:
I did this with dreambooth: https://www.reddit.com/r/StableDiffusion/comments/xybqq7/pushing_dreambooth_teaching_the_model_what/
Do you think running a non-dreambooth finetune with a "a woman doing acrobatics" as a default prompt for all images would result in a better output? Or would this be equivalent to dream booth and I have to do the work writing prompts for all my 2000 training pictures?
3
u/Adorable_Yogurt_8719 Oct 11 '22
Sounds exciting. I'm looking forward to seeing the models that come from this.
2
u/Yacben Oct 11 '22
Create a github repo for it for better accessibility
1
u/Rogerooo Oct 11 '22
Such a breath of fresh air amidst all this toxicity! Thanks for sharing, this looks really cool, hopefully it get's the attention it deserves.
1
u/joachim_s Oct 11 '22
I’m not a programmer so my question might be uninformed: would this work better than merging Dreambooth models to recognise separate individuals in the same image?
1
u/micole00 Oct 16 '22
is normal that during training it always shows 0 iterations but it's training, why?
1
u/Meowish Oct 18 '22 edited May 17 '24
Lorem ipsum dolor sit amet consectetur adipiscing, elit mi vulputate laoreet luctus. Phasellus fermentum bibendum nunc donec justo non nascetur consequat, quisque odio sollicitudin cursus commodo morbi ornare id cras, suscipit ligula sociosqu euismod mus posuere libero. Tristique gravida molestie nullam curae fringilla placerat tempus odio maecenas curabitur lacinia blandit, tellus mus ultricies a torquent leo himenaeos nisl massa vitae.
1
u/jochemstoel Oct 20 '22
Hey u/OrangeRobots, when I use that exact notebook during the training samples generation this happens:
Prompt: painting of a brunette woman100%51/51 [00:17<00:00, 2.98it/s]---------------------------------------------------------------------------KeyError Traceback (most recent call last)<ipython-input-13-a12bfd4127f3> in <module>87 with out:88 print("Prompt:", x[0])---> 89 display(pipe(x[0])["sample"][0])90 global_i += 191 if global_i >= train_steps:/usr/local/lib/python3.7/dist-packages/diffusers/utils/outputs.py in __getitem__(self, k)86 if isinstance(k, str):87 inner_dict = {k: v for (k, v) in self.items()}---> 88 return inner_dict[k]89 else:90 return self.to_tuple()[k]KeyError: 'sample'If I let it finish anyway then running inference gives the same KeyError exception. What could be the reason for this? My dataset consists of 29.000 well prepared square 512x512 images.
1
u/Animystix Oct 25 '22
Is there a way to start with a custom ckpt instead of going through huggingface?
1
u/ax-37 Nov 10 '22
You stole it though https://twitter.com/apeoffire/status/1575495160250929152
1
u/selvz Nov 18 '22
Is there a version to run this locally ? Thanks
1
u/Sillainface Oct 11 '22
How many images do you recommend? do we need to change the text from the images?
1
u/sergiohlb Oct 11 '22
Thanks for sharing. So, if I wanna for instance train the whole model into let's say a group of subjects that are actors of a movie, because textual inversion would affect not related subjects on model. Should I add regularization images to the training dataset to prevent all model stays affected like in your Van Gogh's example?
1
u/CeraRalaz Oct 11 '22
If multiple images are assigned to one prompt, what name should they have? You can name several images one name
1
u/iceandstorm Oct 11 '22
This sounds fascinating.
Does it only nudges the existing model to interpret normal prompts without tokens more in the direction of the provided training data, without adding the training data into the space of the checkpoint?
1
u/bmemac Oct 11 '22
Man where where you 4 days ago when I started finetuning my own model! As a complete noob I spent a whole evening working through the incomplete instructions Lambda posted w/ their Pokemon model. Thanks for this! I'll definitely check this out tonight since I'm still working on my model!
0
u/[deleted] Oct 11 '22
[deleted] — view deleted comment
0
u/[deleted] Oct 11 '22
[deleted] — view deleted comment