This is an automated archive made by the Lemmit Bot.

The original was posted on /r/stablediffusion by /u/More_Bid_2197 on 2024-08-26 18:21:47+00:00.


Be careful with the folder and the name of the models

I’m not sure, but I think that Clip L in the Black labs directory does not work for training (the correct model is 234.7 MB)

Error 1 - T5XXL - you need to download the Fp16 version. It does not work with FP8

Error 2 - location of the models

Place all the models in the “models” folder. Do not place the models in another folder. And use the following path in Kohya.

./models/flux1-dev.safetensors

When you add this path in “pretrained model path” and press the spin arrow button, Kohya will display the Flux options. IMPORTANT

Then, you have to add the path of the other 3 models further down (much further down)

./models/ae.safetensors, do the same for ./models/clip_l.safetensors, and ./models/t5xxl_fp16.safetensors

DO NOT CHANGE THE NAMES

attention - it’s called AE in Flux

2 - second most common mistake, image folder

Folder with images (example - photos) and inside this folder there must be another folder, for example, with the name 1_ohwx man. And the images are there The number indicates the number of repetitions

3 - Don’t forget to click on “folders”. And choose a folder for outputs. There is a folder in the kohya directory with this name

4 - Be careful with Adamw 8 bits. It didn’t work for me. You need to install another package bitsandbytes (I tried but couldn’t), use Adam normal, Adafactor, prodigy

5 - Enable the options

Cache text encoder outputs to speed up inference

Cache text encoder outputs to disk to speed up inference

I can’t explain why, but an error appeared when it was disabled (I’m not sure if you need both, at least the first one)

7 - In model predict use the raw option

And in Timestep Sampling - Sigmoid

Without this it didn’t work and I can’t explain why

8- With 24 GB of Vram I only got the resolution 512 X 512 with the option fp8 for base model (there is another option that I checked and it allowed me to train in Bf16 but it became extremely slow, it would take more than 9 hours, so for me it’s not a good idea)

9 - DO NOT click on Parameters PRESETS. When selecting kohya’s default settings for Flux, a bug was generated saying that the model was not located (something like model.safetensors/r) the r doesn’t make sense. When clicking on this the BUG persists even if you remove it.

10 - I trained with GPU online. Maybe windows is different

11 - DO NOT open runpod directly on port 7860. The GUI will appear, but the GUI alone does not show the training.

You need to select the image with kohya and enter the jupyter notebook (usually port 8888). And after that, go to the kohya directory and run the command

cd kohya_ss

./setup-runpod.sh (to run the script, it may not be necessary)

./gui.sh --share --headless (to launch the GUI, after this command a gradio link will appear at the end to access the gui)

Keep the jupyter notebook open to see if it is training, errors, etc.