In Train, Create Embed, Vectors is how much weight you want your embed to have more weight the more data you can chuck at it, for mine I used 8, max i would use is 16 only if your throwing a tonne of images at it:

Getting Images

I use https://github.com/mikf/gallery-dl to scrape danbooru for images

You run the exe from cmd example
open cmd
cd to the folder you put the exe in
gallery-dl.exe https://danbooru.donmai.us/posts?tags=power_(chainsaw_man)

Then it pulls all the files that match the tag you can obviously add more tags and then copy the URL which I wish I had.

Then use WebGUI to process the images,

Make sure you have set COMMANDLINE_ARGS= --deepdanbooru in your webui-user.bat/sh

In Preprocess Images
Source is the image folder that gallery-dl.exe
made with all the images from dan

Destination is a folder where WebGUI is going to place your images make this folder but leave it empty

These are the options I used
Use deepbooru for caption
Split oversized images

But Auto focal point crop is new and will help its a algo that tries to capture your subject.

I'll be trying out Auto focal point crop next embed I make

DONT USE YOUR IMAGES RIGHT AWAY SHIT GOES IN SHIT COMES OUT

in the output folder delete any shit images

I had to clean my folder a few times as I missed some shit images

I made a small Python Script that will get rid of any .txt files that dont match a images (for after you delete the shite images)

https://pastecode.io/s/i6zwvast

Next is to train it but we need to add txt file

in the stable-diffusion-webui\textual_inversion_templates

create a txt file called filewords.txt, and put [filewords] in it and save

Now TRAIN Under TRAIN

Select your embedding you made in the Embedding tab

DataSet Directory is the image output folder (don't forget to clean out shit images)

Prompt template file
change Drive:\stable-diffusion-webui\textual_inversion_templates\style_filewords.txt
to
Drive:\stable-diffusion-webui\textual_inversion_templates\filewords.txt

Tick Save images with embedding in PNG chunks (if its not by default)

What it will do now is use the prompts from the deepdanbooru from each image to train the embedding

Edit
Pub: 26 Oct 2022 18:04 UTC
Views: 3585