Home Creators Posts Import Register Favorites Logout

Downloads

Content

Updated the very best hyper training parameters / configuration and training workflow for Kohya SS GUI for Stable Diffusion XL (SDXL)

Please visit Patreon exclusive posts index to find all of our Patreon scripts, posts, apps and more.

Join discord to get help, chat, discuss and also tell me your discord username to get your special rank : SECourses Discord

Please also Star, Watch and Fork our Stable Diffusion & Generative AI  GitHub repository and join our Reddit subreddit and follow me on LinkedIn (my real profile)

=======

Latest installer zip file : Kohya_FLUX_DreamBooth_LoRA_v41.zip

20 January 2026 V41

SDXL DreamBooth / Fine Tuning training configs fully updated after new tests

It is 100% recommended to use regularization / classification images with SDXL training, do 1 repeat and use Save Every N Steps method

Watch this tutorial : https://youtu.be/EEV8RPohsbw

Hopefully LoRA configs will be updated too

Massive 4K Resolution Woman & Man Class Ground Truth Stable Diffusion Regularization Images Dataset

12 December 2025 Major Upgrade

Now I am developing both famous SD Scripts and Kohya SS GUI premium versions for our followers

I have implemented SDXL Block Swapping / CPU Offloading thus SDXL training now can be made as low as 6 GB GPUs

Download latest zip file and use it

You will see SDXL_DreamBooth_Tab_Configs folder

The configs are as below

Pick the one that is fitting to your GPU

Also make a fresh installation of Kohya SS GUI i recommend that

Moreover, Windows_Download_Training_Model_Files.bat now provides automatic download for very best realistic SDXL models SDXL_CyberRealistic_v8_FP32 and SDXL_RealVis_v5_FP32

RunPod and Massed Compute instructions are also updated

For LoRA tab i plan to add newer researched configs as well hopefully soon

All previous configs are removed since they are outdated

New zip file includes everything you need

Moreover, the GUI will now auto recognize selected SDXL models and auto pick accurate checkbox

A quick DreamBooth tutorial video : https://youtu.be/EEV8RPohsbw

Up to date massive tutorial video for FLUX but explained SDXL too : https://youtu.be/FvpWy1x5etM

New installer uses Torch 2.8 and CUDA 12.9 with libraries compiled to work with RTX 1000 series to RTX 5000 series like RTX 3060, RTX 3090, RTX 4090, RTX 5090 or cloud GPUs like A100, H100, B200, RTX PRO 6000

Morever we have 1-click installers for RunPod and Massed Compute

Windows Requirements

Python 3.10, FFmpeg, CUDA 12.9, cuDNN 9.12 , C++ tools and Git

If it doesn't work make sure to below tutorial and install everything exactly as shown in this below tutorial

https://youtu.be/DrhUHnYfwC0

This is a very very requirements dependend app so follow tutorial exactly with its updated post

Massed Compute (Recommend Cloud) :

Please register via this link : https://vm.massedcompute.com/signup?linkId=lp_034338&sourceId=secourses&tenantId=massed-compute

Use our coupon SECourses

Our coupon works on all GPUs now

RTX 6000 PRO has amazing price and speed but you can use like RTX A6000 ADA or L40S as well

Full details here : https://www.patreon.com/posts/26671823

Then select our image SECourses from Creator dropdown

Then follow Massed_Compute_Instructions_READ.txt

Same as my any other Massed Compute installer script

Example tutorial for learn how to install and use Massed Compute

(Starts at 12:58) : https://youtu.be/KW-MHmoNcqo?si=G1WbG-Qw4ujWvOtG&t=778

RunPod (Cloud):

Please register via this link : https://get.runpod.io/955rkuppqv4h

Then follow Runpod_Instructions_READ.txt

Same as my any other RunPod installer script

Use the template written in Runpod_Instructions_READ.txt file

Example tutorial for learn how to install and use RunPod

(starts at 22:03) : https://youtu.be/KW-MHmoNcqo?si=QN8X8Sjn13ZYu-EU&t=1323

17 August 2024 Update

I have done new 30 trainings (i had done 150+ before) after the latest changes of the Kohya

With v2 new configs (at the attachments) we have added noise_offset and ip_noise_gamma (perturbation noise)

These new settings improves quality of colors after training and make them lesser saturated and more natural

23 May 2024 Update

Example RunPod SDXL Config Newest GUI : Example_SDXL_RunPod_Config.png

For 8400 (200 repeat) steps training on RunPod, full configuration image : runpod_8400_Steps.png

For Windows only folder paths would change

21 May 2024 Update

20 Example images shared here please consider to upvote : https://www.reddit.com/r/StableDiffusion/comments/1cwuxeb/newest_kohya_sdxl_dreambooth_hyper_parameter/

Extensively compared different LR rates for both Text Encoder and U-Net

This was mandatory since recent Kohya updates changed how LR is applied

The new config files are tested on Version 24.1.4 and commit id 5ed56238b2c5c93e1510876c20524d391793161d

My newest strategy is setting 200 repeat and 1 epoch and saving every n-steps checkpoints to compare

This way it is able to use maximum number of regularization images

If you don't use reg images, you can directly set number of epochs

I also have prepared 20 amazing prompts to compare checkpoints

I am using x/y/z checkpoint comparison and Prompt S/R

Check How-I-Do-Test.png to see how I am testing

Check test_prompts.txt to see prompts

You can use their Prompt S/R version from prompt_SR_test_prompts.txt

I am also sharing 2 comparison files (comparison 1 , comparison 2) with you so you can see different Learning rate values difference

Comparison files are huge 24346 x 22772 pixels

The naming of comparisons meanings are as follows : 8e_6_TE_2e_6 : 8e-06 (0.000008) is the U-Net learning rate and 2e-06 (0.000002) is the Text Encoder 1 learning rate. Text Encoder 2 never trained.

I have used RealVis XL version 4 for trainings : https://huggingface.co/SG161222/RealVisXL_V4.0/resolve/main/RealVisXL_V4.0.safetensors

You can also use SDXL Base but for realism I prefer RealVis XL 4

Tier1_24_GB_Slower_v2.json config file uses 16.3 GB VRAM currently - same quality config on OneTrainer is only 10.3 GB since it has Fused Back pass : https://www.patreon.com/posts/96028218

Tier1_48_GB_Faster_v2.json config is same quality as 24 GB but faster since doesn't use Gradient Checkpointing. Gradient checkpoint reduces VRAM usage but also makes it slower with same quality

Sadly there isn't anymore lower VRAM since both xFormers and SPDA attention didn't reduce VRAM usage

However you can still try on 12 GB card config : Tier2_LowVRAM_v2.json

I strongly suggest you to use OneTrainer if you don't have 24 GB GPU

I personally find that 8e-06 for U-Net and 3e-06 for Text Encoder 1 as best for flexibility and resemblance

If you need more like anime 3d style, you can reduce learning rate to 6e-06 (0.000006) for both Text Encoder 1 and for U-Net and lose some resemblance but obtain more styling : click to download comparison

Currently save every n-steps is set to 451

You need to set it according to your total number of steps

So after setting your Pretrained model name or path, Trained Model output name, Image folder (containing training images subfolders), Output directory for trained model, Regularisation directory (Optional. containing regularisation images) click Print training command button and look for max_train_steps 

Then you can divide it to the number of checkpoints you want to obtain

In my case I had 15 training images, 150 repeat and use our very best ground truth regularization images with batch size 1 : https://www.patreon.com/posts/massive-4k-woman-87700469

So my max_train_steps was = 15 x 150 x 2 = 4500 steps

Therefore I made save every n epoch = 1, train epoch = 1 and save every n-steps = 451 - we add +1 so at last step we don't save twice, and thus I got 10 checkpoints

The experiments are made on below training dataset with 15 training images and 150 repeat and 1 epoch

I didn't use any captioning. Only ohwx man for training images from folder names and man for reg images from folder names

Hopefully will record a new tutorial for Kohya later for Windows, RunPod, Massed Compute and Kaggle

You can see image captioning effect comparison here : https://www.patreon.com/posts/compared-effect-101206188

You can also see different Text encoder Learning rates comparison by downloading this zip file : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/text_encoder_comparison.zip

I think best strategy would be training 2 models

1st 8e-06 U-Net and 3e-06 Text Encoder 1 and second one is 6e-06 U-Net and 6e-06 Text Encoder 1 and then generate images on both of them and use the best ones. Since each model will perform best on individual prompts.

As a sampler I find that UniPC is best, Schedule type doesnt matter, 40 steps for generation and 70 steps for ADetailer with 0.5 denoise

How to do DreamBooth training quick Patreon special tutorial video >

https://www.youtube.com/watch?v=EEV8RPohsbw

How to setup and install Kohya on Windows : https://youtu.be/sBFGitIvD2A

How to setup and install Kohya on RunPod : https://youtu.be/-xEwaQ54DI4

All models saved in https://huggingface.co/MonsterMMORPG/kohya_new_test (private repo a reminder for me)

TIPs

--enable_wildcard

 to enable multi line caption in Kohya SS

20 Example Images Please Also Upvote : https://www.reddit.com/r/StableDiffusion/comments/1cwuxeb/newest_kohya_sdxl_dreambooth_hyper_parameter/

Files

How To Do Stable Diffusion XL (SDXL) DreamBooth Training (Full Fine Tuning) On Windows and RunPod

Patreon post for config files ⤵️ https://www.patreon.com/posts/89213064 SECourses Discord To Get Full Support ⤵️ https://discord.com/servers/software-engineering-courses-secourses-772774097734074388 My LinkedIn ⤵️ https://www.linkedin.com/in/furkangozukara/ My Instagram ⤵️ https://www.instagram.com/gozukarafurkan/ My Medium ⤵️ @FurkanGozukara https://medium.com/@furkangozukara My CivitAI ⤵️ https://civitai.com/user/SECourses

Comments

Eric Born

Hi Furkan, this is great information as I'd been struggling to get Dreambooth to produce anything decent on SDXL. Would you suggest any major changes for training on a larger imageset besides the formula = train_imgs * 2(if class img used) * repeating_count * number_of_epochs? Keep up the great work!

Rafał Bednarczuk

How is realism of photos and consistency of person between photos of SDXL compared to dreambooth 1.5 stable diffusion training?

So Sha

Great result! So, how long did it take for you to train, and what was your hardware configuration? I tested your setup on 4090 24GB and 64GB of RAM. Here are the results: 135 hours without Transformers and gradient checkpoint. 19 hours with gradient checkpoint and Transformers. Screenshot: https://ibb.co/kKZW0nh It means I wasn't able to continue the training process. Therefore, we need to take hardware configurations into account when selecting our parameters.

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

unfortunately 4090 is having major problems. for example 3090 is getting 1 it / second when doing training with xformers enabled fast config. how much it / s you are getting? by the way 24 gb GPU has to use xformers. otherwise it will bottleneck the GPU VRAM. so with xformers enabled gradient checkpoint disabled 7200 steps taking 2 hours for RTX 3090

So Sha

For /it I sent you an screenshot through discord. For me it showed 15 hr at start but it took 2:30 hours finally. But didn't get good result.

Jorge Reverte Sevillano

Is there gonna be a step by step video on this? Because i feel absolutely lost 🙄

Jason Sutis

For the regularization images, how many should you strive for (with the 40 training images you mentioned). Also should the regularization images be 1024x1024 or can they be multi sizes.

Jason Sutis

P.s. - I don't understan 'The very best found command is as below' - do you use that in addition to the .json config file? or if you use the config file it is baked in??? (sorry i'm a dumb video editor)

Ec Jep

What platform do you recommend for performing 48gb training. Kaggle? I don't mind paying for a few trainings to get the quality.

Ec Jep

I tried doing kaggle 24gb DB training using your suggested parameters (bf16) but I get this error. Maybe I need runpod instead? "ValueError: bf16 mixed precision requires PyTorch >= 1.10 and a supported device."

Guillaume Bieler

I've noticed that you don't use bucketing in those configs, is there a reason?

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

since all of my images are 1024x1024. also bucketing system had errors in past so i dont enable. moreover bucketing causes more VRAM usage. but if you want to train different aspect ratios you have to enable bucketing which i dont suggest until you become experienced

Guillaume Bieler

Thanks, that is interesting. I've been using dreambooth quite a lot over the last few months and I usually use Bucketing. That said, I've noticed that some trainings just don't work as well as others and I can't always tell why. Is it possible that bucketing has something to do with it? I remember reading somewhere that if your buckets are unbalanced, some have just one image for example, then it can bias the training. Is that the kind of problem you are trying to avoid here?

Ec Jep

The kaggle options available on my free account are T4x2, P100 & VM v3-8. I was using T4x2

StableMelter

what ratio do you recommend for training images : class images when doing lora or dreambooth training of a character with unique token?

Keith F

if fine tuning on runpod, which gpu is best for the best configuration?

StableMelter

Thank you for answering. So I should always use all the class images you have provided on this page, regardless of how many training images I have for the subject? What I mean is like if I have 15 training images or 30 training images, I should always use all the 3000+ training images for dreambooth training?

Keith F

Thanks, how about the 48gb one?

Keith F

Oh on what GPU A6000?

Keith F

Thanks man, these jsons save so much time, appreciate your work

Miguel Jeronimo

I've been trying to run this configs during the last week on py pc (Windows) and I had no success at all. Using the generated Loras has no effect at all. Using the same training images with but creating the configuration from zero using the kaggle training tutorial works perfectly (local or in kaggle). Can you spot the error in my configuration? accelerate launch --num_cpu_threads_per_process=4 "./sdxl_train_network.py" --pretrained_model_name_or_path="stabilityai/stable-diffusion-xl-base-1.0" --train_data_dir="E:/training2\img" --reg_data_dir="E:/training2\reg" --resolution="1024,1024" --output_dir="E:/training2\model" --logging_dir="E:/training2\log" --network_alpha="1" --save_model_as=safetensors --network_module=networks.lora --network_dim=8 --output_name="best_DreamBooth" --lr_scheduler_num_cycles="8" --no_half_vae --full_bf16 --learning_rate="1e-05" --lr_scheduler="constant" --train_batch_size="1" --max_train_steps="12160" --save_every_n_epochs="1" --mixed_precision="bf16" --save_precision="bf16" --cache_latents --cache_latents_to_disk --optimizer_type="Adafactor" --optimizer_args scale_parameter=False relative_step=False warmup_init=False weight_decay=0.01 --max_data_loader_n_workers="0" --bucket_reso_steps=64 --gradient_checkpointing --bucket_no_upscale --noise_offset=0.0 I'm running this in a Windows pc with a 4060 ti 16gb. Have tried to change bf16 to f16 with no success at all

Samuel

160 hours for 13K steps in a 3090... what am I doing wrong?

Zsédely Ruben

Thanks, I used these settings on lora with default LR and got flexible yet fairly accurate results. Right now I have 8GB VRAM so I cannot do dreambooth training yet.

noone

thank you for this valuable information just have few questions How many images (minimum) I should provide? How long it takes to finsh the training? What if i wnat to enable the gradient checkpointing will it reduce the quality?

noone

how about not using reg images? will it give realistic results?

JS

Very best one : 48_gb_VRAM_config_best.json What would be used to achieve 48gb Vram? I am using a 4090 what is the best config file for it? Also is this the latest method for training SDXL or is there another post that you are working on?

JS

Is there a video or text tutorial on how to get this all to work with SDXL?

JS

I guess I will wait for the video you mention in this response on your YouTube channel: @SECourses 4 days ago thank you so much. the biggest speed up would come from higher batch size like 2 or 3 and lesser number of steps. both way things require a precisely found new learning rate. moreover I suggest you to try my dreambooth workflow which is 10x better literally in terms of quality and speed almost same : https://www.patreon.com/posts/very-best-for-of-89213064 - a video for this workflow coming soon hopefully

Alexandre Ruffer

So I am running best_settings_24_gb_VRAM_config_no_xformers.json on dreambooth the only change I did was I edited 8 epochs to 1, this means I will only have one .safetensor model to train, do I lose anything lowering down this value? I did this because the training time was to dramatic, now with 1 epoch It is one hour. Second question would be I was monitoring GPU stats for this training and it rarely used it, always taking power of CPU and Memory, is this right? Thanks for the grind, excited about this upcoming dreambooth for sdxl tutorial. Cheers.

Alexandre Ruffer

If I do 160 repeating count which I believe is equal to Repeats on Dataset preparation field, it just increases me the training to +100 hours. I have a Nvidia 4090 and I'm using best_settings_24_gb_VRAM_config_no_xformers, what suggestions would you give me? accelerate launch --num_cpu_threads_per_process=4 "./sdxl_train.py" --pretrained_model_name_or_path="C:/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1 .0.safetensors" --train_data_dir="C:/Users/alexr/Documents/Stable Diffusion/Models/Alexandre Belorio/Output-160\img" --reg_data_dir="C:/Users/alexr/Documents/Stable Diffusion/Models/Alexandre Belorio/Output-160\reg" --resolution="1024,1024" --output_dir="C:/Users/alexr/Documents/Stable Diffusion/Models/Alexandre Belorio/Output-160\model" --logging_dir="C:/Users/alexr/Documents/Stable Diffusion/Models/Alexandre Belorio/Output-160\log" --save_model_as=safetensors --full_bf16 --output_name="negao-160" --lr_scheduler_num_cycles="1" --max_data_loader_n_workers="0" --learning_rate="1e-05" --lr_scheduler="constant" --train_batch_size="1" --max_train_steps="4160" --save_every_n_epochs="1" --mixed_precision="bf16" --save_precision="bf16" --cache_latents --cache_latents_to_disk --optimizer_type="Adafactor" --optimizer_args scale_parameter=False relative_step=False warmup_init=False weight_decay=0.01 --max_data_loader_n_workers="0" --bucket_reso_steps=64 --gradient_checkpointing --bucket_no_upscale --noise_offset=0.0

Nathan L.

"./sdxl_train.py" - where can I find this script?? Also, how many input images did you upload?

Nathan L.

Cool - nothing has changed since then?

Doc Snyder

The config shows 4 epochs and your .txt tells 8 epochs? What is useful?

Doc Snyder

I'll try 6 epochs :-)

Zsédely Ruben

error: unrecognized arguments: --train_text_encoder Is there a newer kohya script that can handle this command?

Anduvo

when we should use the text encoder one and when not ?

Dat

The formula = train_imgs * 2(if class img used) * repeating_count * number_of_epochs In my case : 13 * 2 * 40 * 4 = 4160 Sorry for not understanding, can you explain more clearly why it is multiplied by 2?

LO Last

Is there a tutorial for using this to train dreambooth model using Kohya?

Hassan Alhassan

should we keep these the same ? Network Rank (Dimension) 8 Network Alpha 1

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

you can increase. like 32 64 128. as you increase it will learn subject more but the model general knowledge will get reduced. 8 is pretty low. try 32 first . by the way DreamBooth don't have rank. only LoRA has rank. Don't get confused. DreamBooth trains entire model and it is better .

JS

SECourses: Tutorials, Guides, Resources, Training, MidJourney, Voice Clone, TTS, ChatGPT, GPT, LLM, Scripts by Furkan Gözükara 1w Tutorial very soon hopefully Has this video been created yet?

Rafael Villalba

I will ask the most innocent question of your entire channel, once I finish the training in runpod, how can we initialize the SD UI? In the future when we want to use our trained models, is it okay for us to use the webUI that runpod gives us by default in its SDxl template? Thank you so much !!

mahendra naik

The accelerate command for 48 GB setup at the end doesn't work. It always says 0 train images and 0 reg images even when the directory has images. Please update the documentation. It is misleading.

mahendra naik

Yeah, it was an issue with me setting up the data folders. It works fine now. What is the repeat count ?

R Rehm

Do you think this would work for multiple rare tokens in the same class? I have used your config from last month and also compared with LoRA, Dreambooth is still the best. Thanks for this update I will try it on my pod!

Ec Jep

Fantastic collection of parameters for everyone. Thank you very much for the research and sharing.

So Sha

Good Job Dr, I’ll try it and let you know the results. 👍

M R

What's your recommendation for regularization images – how many, is there a particular set you've found best, captions or not?

M R

Thanks. What about the regularization set? Have you seen better results with AI generated images, as many seem to recommend, or real photos such as your "Massive 4K Resolution Woman & Man" set?

R Rehm

I tried this yesterday but the rare tokens all mixed in to the class token (man) and one of the rare tokens ended up dominant. It was possible to repair this with negative prompts but not to a high enough level. Very interesting outcome but obviously not the desired one!

Chris

I get CUDA out of memory using the A5000 on runpod if I use the 24gig, I have to remove the VAE and the additional parameters to get it to run. Any help to use properly?

Joel Maynard

hello sir, i appreciate all your work, but when I am training lora or dreambooth following your instructions, i am facing the problem of likeness, i am using training 12+ images and 2000+ reg images and i am using sdxl 1.0 model, do you have any tips to improve likeness ?

Joel Maynard

i will be glad if you give consultation

Daniel Seravalli

Hi Furkan, thanks for your work on his. What settings do you use when you are prompting your trained models? sampling method, step count, cfg scale. Are you changing any other settings in auto1111?

So Sha

Furkan, I wanted to setup your recommended text encoder for kohya on ubuntu, but I couldn't understand what should I do : Currently text encoder training of SDXL is only supported in sd-scripts-dev branch So open a cmd and do git pull in your Kohya GUI folder Then do git checkout sd-scripts-dev Then do another git pull Would you please explain this part more?

Arcon Septim

Can you please make a full video tutorial with all the steps and in detail? Like from choosing best training images and then fine tuning afterwards, thaank you!

DAVID PEREZ

Great news, also if you could make a github update or and update on the Kohya kaggle patreon page would be awesome

Meito

even with lora extraction i get - Text encoder is same. Extract U-Net only.

Jan PR

Do you have regularization images of dogs?

Khoa Vo

I see that the number of epochs for the 24GB config is set to 8. Isn't that really high? I'm using around 15 images.

Khoa Vo

Can you elaborate on that a bit more? If I have 15 images are you saying I should repeat 150 times and just do 1 epoch? Right now I am doing 15 images and 40 repeats and 8 epochs. Which takes quite a long time to train.

Hikarias (edited)

Comment edits

2026-09-07 10:00 Hello, could you share settings, I mean a .json file but for stable diffusion 1.5 models too?
2023-12-28 02:16

Ksottam

Much appreciated. Keep it up! :)

Felix Rockwell

In this video https://www.youtube.com/watch?v=EEV8RPohsbw you say: save the lora file into /workspace/stable-diffusion-webui/models/Stable-diffusion/model But the lora files are here: workspace/stable-diffusion-webui/models/Lora So I don't understand why are you not saving it directly to Lora folder?

Anonyme pas trop anonyme

Is there ANY parameter to make a way longer training and get better results ? if yes, what dataset size and how many repeats ?

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

There is no parameter. we are using very best ones. so to make it better you need to improve your training dataset. lets say you have collected 50 images then do this. 5200 / 50 = 104. so do 104 repeating and 2 epochs and save 10 checkpoints . to save 10 check points make 102 * 2 * 50 * 2 / 10 + 1 = 2041 . so save once every 2041 steps usually 200 repeating and 1 epoch is good. but you can train longer and compare more checkpoints

Hikarias (edited)

Comment edits

2026-09-07 10:00 how many repats should i use if i have a dataset of 319 images. And how many is they are 100 images.? There is a formula or how i calculate how many repeats should i use, im using your reg images.
2024-01-11 11:52

jason santana

I tried every single step of your video from signing it up to your Patron and trying the json on here, to using only 14 images. My computer still says it's going to take 27 hours. I have a 4070ti. Do you have a possible resolution to this issue?

jason santana

Thank you. I actually have 16GB in my GPU, i'll try this method.

mike oxmaul

Have you done any trainings or other models? Instaed of the sdxl 1.0 or 0.9 base. I know we used to train on realistic vision when doing SD1.5. Looking at realism in particular.

mike oxmaul

Are their particular models that are suitable for dreambooth training compared to others? What makes them suitable? I'm going to do some 48gb test encoder trainings today. I could test a specific model for you compared to base if you'd like.

Anduvo

Hi Furkan, with the latest khoya I am getting this error with your 24GB text encoder parameters: sdxl_train_network.py: error: unrecognized arguments: --train_text_encoder It seems they removed or changed something ? could you please take a look ?

Anduvo

You are right! I was training a lora, sorry my bad for the false alarm. Thank you!

Anduvo

Hi Furkan, since kohya ss doesn't have an inpainting training, which other tool would you recomend to train an inpaint model ?

Teamin

I see that you are not training the second text encoder. Can you let me know why?

Teamin

Thank you. These are great insights.

Nikoles Frances

This is what I get when trying both the no text encoder and text encoder 24gb (3090) The following values were not passed to `accelerate launch` and had defaults used instead: `--num_processes` was set to a value of `1` `--num_machines` was set to a value of `1` `--mixed_precision` was set to a value of `'no'` `--dynamo_backend` was set to a value of `'no'` To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`. usage: sdxl_train_network.py [-h] [--v2] [--v_parameterization] [--pretrained_model_name_or_path PRETRAINED_MODEL_NAME_OR_PATH] [--tokenizer_cache_dir TOKENIZER_CACHE_DIR] [--train_data_dir TRAIN_DATA_DIR] [--shuffle_caption] [--caption_separator CAPTION_SEPARATOR] [--caption_extension CAPTION_EXTENSION] [--caption_extention CAPTION_EXTENTION] [--keep_tokens KEEP_TOKENS] [--caption_prefix CAPTION_PREFIX] [--caption_suffix CAPTION_SUFFIX] [--color_aug] [--flip_aug] [--face_crop_aug_range FACE_CROP_AUG_RANGE] [--random_crop] [--debug_dataset] [--resolution RESOLUTION] [--cache_latents] [--vae_batch_size VAE_BATCH_SIZE] [--cache_latents_to_disk] [--enable_bucket] [--min_bucket_reso MIN_BUCKET_RESO] [--max_bucket_reso MAX_BUCKET_RESO] [--bucket_reso_steps BUCKET_RESO_STEPS] [--bucket_no_upscale] [--token_warmup_min TOKEN_WARMUP_MIN] [--token_warmup_step TOKEN_WARMUP_STEP] [--dataset_class DATASET_CLASS] [--caption_dropout_rate CAPTION_DROPOUT_RATE] [--caption_dropout_every_n_epochs CAPTION_DROPOUT_EVERY_N_EPOCHS] [--caption_tag_dropout_rate CAPTION_TAG_DROPOUT_RATE] [--reg_data_dir REG_DATA_DIR] [--in_json IN_JSON] [--dataset_repeats DATASET_REPEATS] [--output_dir OUTPUT_DIR] [--output_name OUTPUT_NAME] [--huggingface_repo_id HUGGINGFACE_REPO_ID] [--huggingface_repo_type HUGGINGFACE_REPO_TYPE] [--huggingface_path_in_repo HUGGINGFACE_PATH_IN_REPO] [--huggingface_token HUGGINGFACE_TOKEN] [--huggingface_repo_visibility HUGGINGFACE_REPO_VISIBILITY] [--save_state_to_huggingface] [--resume_from_huggingface] [--async_upload] [--save_precision {None,float,fp16,bf16}] [--save_every_n_epochs SAVE_EVERY_N_EPOCHS] [--save_every_n_steps SAVE_EVERY_N_STEPS] [--save_n_epoch_ratio SAVE_N_EPOCH_RATIO] [--save_last_n_epochs SAVE_LAST_N_EPOCHS] [--save_last_n_epochs_state SAVE_LAST_N_EPOCHS_STATE] [--save_last_n_steps SAVE_LAST_N_STEPS] [--save_last_n_steps_state SAVE_LAST_N_STEPS_STATE] [--save_state] [--resume RESUME] [--train_batch_size TRAIN_BATCH_SIZE] [--max_token_length {None,150,225}] [--mem_eff_attn] [--xformers] [--sdpa] [--vae VAE] [--max_train_steps MAX_TRAIN_STEPS] [--max_train_epochs MAX_TRAIN_EPOCHS] [--max_data_loader_n_workers MAX_DATA_LOADER_N_WORKERS] [--persistent_data_loader_workers] [--seed SEED] [--gradient_checkpointing] [--gradient_accumulation_steps GRADIENT_ACCUMULATION_STEPS] [--mixed_precision {no,fp16,bf16}] [--full_fp16] [--full_bf16] [--ddp_timeout DDP_TIMEOUT] [--clip_skip CLIP_SKIP] [--logging_dir LOGGING_DIR] [--log_with {tensorboard,wandb,all}] [--log_prefix LOG_PREFIX] [--log_tracker_name LOG_TRACKER_NAME] [--log_tracker_config LOG_TRACKER_CONFIG] [--wandb_api_key WANDB_API_KEY] [--noise_offset NOISE_OFFSET] [--multires_noise_iterations MULTIRES_NOISE_ITERATIONS] [--ip_noise_gamma IP_NOISE_GAMMA] [--multires_noise_discount MULTIRES_NOISE_DISCOUNT] [--adaptive_noise_scale ADAPTIVE_NOISE_SCALE] [--zero_terminal_snr] [--min_timestep MIN_TIMESTEP] [--max_timestep MAX_TIMESTEP] [--lowram] [--sample_every_n_steps SAMPLE_EVERY_N_STEPS] [--sample_every_n_epochs SAMPLE_EVERY_N_EPOCHS] [--sample_prompts SAMPLE_PROMPTS] [--sample_sampler {ddim,pndm,lms,euler,euler_a,heun,dpm_2,dpm_2_a,dpmsolver,dpmsolver++,dpmsingle,k_lms,k_euler,k_euler_a,k_dpm_2,k_dpm_2_a}] [--config_file CONFIG_FILE] [--output_config] [--metadata_title METADATA_TITLE] [--metadata_author METADATA_AUTHOR] [--metadata_description METADATA_DESCRIPTION] [--metadata_license METADATA_LICENSE] [--metadata_tags METADATA_TAGS] [--prior_loss_weight PRIOR_LOSS_WEIGHT] [--optimizer_type OPTIMIZER_TYPE] [--use_8bit_adam] [--use_lion_optimizer] [--learning_rate LEARNING_RATE] [--max_grad_norm MAX_GRAD_NORM] [--optimizer_args [OPTIMIZER_ARGS ...]] [--lr_scheduler_type LR_SCHEDULER_TYPE] [--lr_scheduler_args [LR_SCHEDULER_ARGS ...]] [--lr_scheduler LR_SCHEDULER] [--lr_warmup_steps LR_WARMUP_STEPS] [--lr_scheduler_num_cycles LR_SCHEDULER_NUM_CYCLES] [--lr_scheduler_power LR_SCHEDULER_POWER] [--dataset_config DATASET_CONFIG] [--min_snr_gamma MIN_SNR_GAMMA] [--scale_v_pred_loss_like_noise_pred] [--v_pred_like_loss V_PRED_LIKE_LOSS] [--debiased_estimation_loss] [--weighted_captions] [--no_metadata] [--save_model_as {None,ckpt,pt,safetensors}] [--unet_lr UNET_LR] [--text_encoder_lr TEXT_ENCODER_LR] [--network_weights NETWORK_WEIGHTS] [--network_module NETWORK_MODULE] [--network_dim NETWORK_DIM] [--network_alpha NETWORK_ALPHA] [--network_dropout NETWORK_DROPOUT] [--network_args [NETWORK_ARGS ...]] [--network_train_unet_only] [--network_train_text_encoder_only] [--training_comment TRAINING_COMMENT] [--dim_from_weights] [--scale_weight_norms SCALE_WEIGHT_NORMS] [--base_weights [BASE_WEIGHTS ...]] [--base_weights_multiplier [BASE_WEIGHTS_MULTIPLIER ...]] [--no_half_vae] [--cache_text_encoder_outputs] [--cache_text_encoder_outputs_to_disk] sdxl_train_network.py: error: unrecognized arguments: --train_text_encoder Traceback (most recent call last): File "C:\Users\thriv\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\thriv\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\thriv\AppData\Local\Programs\Python\Python310\Scripts\accelerate.exe\__main__.py", line 7, in File "C:\Users\thriv\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\commands\accelerate_cli.py", line 47, in main args.func(args) File "C:\Users\thriv\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\commands\launch.py", line 986, in launch_command simple_launcher(args) File "C:\Users\thriv\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\commands\launch.py", line 628, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['C:\\Users\\thriv\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', './sdxl_train_network.py', '--pretrained_model_name_or_path=E:/SD 1/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors', '--train_data_dir=E:/2.SD Tools/Fine Tuniing\\img', '--reg_data_dir=E:/2.SD Tools/Fine Tuniing\\reg', '--resolution=1024,1024', '--output_dir=E:/2.SD Tools/Fine Tuniing\\model', '--logging_dir=E:/2.SD Tools/Fine Tuniing\\log', '--network_alpha=1', '--save_model_as=safetensors', '--network_module=networks.lora', '--network_dim=8', '--output_name=Julie_Hadi_1.0XL', '--lr_scheduler_num_cycles=8', '--no_half_vae', '--full_bf16', '--learning_rate=1e-05', '--lr_scheduler=constant', '--train_batch_size=1', '--max_train_steps=3120', '--save_every_n_epochs=1', '--mixed_precision=bf16', '--save_precision=bf16', '--cache_latents', '--cache_latents_to_disk', '--optimizer_type=Adafactor', '--max_grad_norm=1', '--max_data_loader_n_workers=0', '--bucket_reso_steps=64', '--gradient_checkpointing', '--bucket_no_upscale', '--noise_offset=0.0', '--max_grad_norm=0.0', '--no_half_vae', '--train_text_encoder', '--vae=stabilityai/sdxl-vae']' returned non-zero exit status 2.

Tigger Saldy

I am trying "How To Do Stable Diffusion XL (SDXL) DreamBooth Training (Full Fine Tuning) On Windows and RunPod" I am training with 8 (1024 x 1024) images, getting my regularisation images, with download_man_reg_imgs, and using 24GB_TextEncoder for my config file on a runpod RTX 3090 26 vCPU 93 GB RAM, with 150 GB Disk. But imaterial of the disk size I use (I have tried 10, 20, 50, 150), the training dies at 38% with this messsage, after running 6 epochs. shutil.Error: [('/workspace/train/DSC_0190.JPG', '/workspace/stable-diffusion-webui/models/Stable-diffusion/img/40_ohwx man/DSC_0190.JPG', '[Errno 122] Disk quota exceeded') Any feedback would be appreciated.

OP-Cast (edited)

Comment edits

2026-09-07 10:00 Hi Sir, I would greatly appreciate guidance on fine tuning my steps epochs/repeats. Currently I've been doing my training on Kohya SS using prodigy following this guide here >> https://civitai.com/articles/3522/valstrixs-crash-course-guide-to-lora-and-lycoris-training I've been playing with a couple checkpoints EpicRealismXl V1 and NightVisionXL, (going for pure realism) do you recommend base sdxl? or go for a checkpoint already tailored for my use. Also I'm having trouble wrapping my head around steps ect and overbaking. My dataset consists of 179 photots of 1 subject (wife) I have a mixture of dynamic full body/half/closeupface. I was using WD14 captioning but as im typing this im using your personal tagger setup blip2 and the bg something lol from your yt video. Anyways do you recommend captions if i only have 1 subject, and also i downloaded your regurlization woman set both uncropped and 1536x1536. Appreciate any guidance! Thank you. "TLDR 179 images in dataset 1 subject, caption yes or no?, how many epoch and how repeat ex 20_woman ect what settings with your female dataset."
2024-02-12 01:36

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

hello. you have too many images. i dont know their quality. if their quality is good and high then ok so here my suggestions. you should go step by step experiment and compare my first suggestion : pick 15 very good images like the dataset i have shown. you can even pick better one : use SDXL base 1.0 : train 150 repeat , 1 epoch, our regularization images : make all training images 1024x1024 so your training becomes 1024x1024 : use our 1024x1024 woman reg images dataset after you obtain some base results with this do this : use your 179 images dataset : make sure all cropped to 1024:1024 - we have auto cropper too : use repeating 29 : use our 1024x1024 reg images : train 2 epochs : save every : 179 * 29 * 2 / 10 + 1 = 1039 steps this will give you 10 checkpoints. compare them with x/y/z do not use captions. train with only ohwx woman after all these done let me know the results

Tigger Saldy

Thank you for your super quick response - I will try that. Thanks for all the videos and effort.

Tigger Saldy

clarifying that the change where the changes need to be made ... where would the 321 steps go to? Dreambooth/Parameters/Basic - Epoch=1 Dreambooth/DataSet Preperation/Dreambooth/LoRA Preperation/Training Images Repeats= 200

Atmateria (edited)

Comment edits

2026-09-07 10:00 Hello, which configuration should I use for the NVIDIA RTX A4000 -20GB VRAM and 64GB RAM, 16GB or 24GB? With TextEncoder and without it?
2024-02-12 22:13

Tigger Saldy

I get an image for a prompt like "photo of ohwx man", but for prompts below I do not get the character (after trying to generate 20-25 times). Is the issue with that my training images need to show enough to match the prompt? (like a full-body image). Also in your YT video there is a ADetailer section - does the model need to be downloaded into a certain directory for it to show up? "High-resolution, full-body photograph of an (ohwx man:1.1) suitable for a popular Instagram post etc. etc." or "photo of ohwx man walking in new york city, shot on Fujifilm Superia 400 ..."

Arcon Septim

Is this getting outdated or still the best? ^^

Franco Acosta Diaz

Hi, I don't understand this, how do I implement it in Runpod?

Davit Sharian

Hi, if I have 30 images for training, do I need to change repeats count? or it will work for me with 40 repeats too?

Davit Sharian

it's giving like 6 hours of training on RTX3090

Davit Sharian

train_imgs * 2(if class img used) * repeating_count * number_of_epochs according to your formula, is there any difference if I use 10 epochs with 15 repeats, and 1 epoch with 150 repeats? in two cases I'll have 9000 steps for 30 images

Davit Sharian

which one is better more epochs less repeats or more repeats 1 epoch, or they are the same, for the same steps count, thank you

Elie Hamouche

Any tips on the parameters to set when generating images with the trained model? I've imported the model into Automatic1111 but can't seem to get the quality and sharpness shown in the SDXL examples.

Elie Hamouche

Nice thank you, I've been using the juggernaut model for a while now and it's really high quality compared to these. Any ideas on how to get as good of quality in terms of realism. For example: https://civitai.com/images/7022338

Elie Hamouche

Do you think it makes sense to train on top of juggernaut with the same settings as in this post? Happy to try it out and share my results with the community, any tips before I start the training would be appreciated!

Sugar Coat VFX Design

Hi, If I have 100 images for training, should I use all of your Reg images (5200 images) ? If I use less Reg images, should I use more Repeat for Reg images?

Elie Hamouche

Looks like training other models isn't as good as the base, so will stick with the original method which is giving the best results.

Elie Hamouche

When the training is done, should the final output model be used? or do we need to look at intermediate checkpoints to try and find the best model (like the xyz analysis in this post)

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

if you have 100 images make repeating 52. it will use all reg images. so it will be total 5200 steps * 2 = 10400. if you need more than 1 epoch you can increase count. to save checkpoints use save every N steps. like for 10400 use 1041 to save 10 checkponts

Franco Acosta Diaz

Hello, I am quite lost. I don't understand the parameters and how should I configure it in the best way according to my needs. I have 29 photos. I have to take the .json and change the parameters according to the number of my photos. What are the parameters I should change in the .json and how. Thank you very much.

Sugar Coat VFX Design

Thank you for this very best workflow ! Do you think it helps if I add additional duplicated image set but remove all the background of each image?

Vasiliy Bulanov

Can you pleas give a hint on how to run permanent share link at gradio? don't quite get it:)

Josh Tech

Newbie question here: Are those the correct settings (epoches, repeats, safe every N epoches) that you recommend for 100 training images and your reg. images? https://imgur.com/a/4SnXFtV Thanks a lot

Josh Tech

with the settings in my screenshot I need about 11 hour to finish two epoches with 24GB VRAM. Did I do something wrong xD?

Alec Scott

So I've been able to consistently produce fairly high quality sample images during training, but then when I move the model over to Stable Diffusion in Automatic1111, the output quality is significantly lower, and looks nothing like what was sampled. The generation settings for the sample images and in Stable Diffusion are the exact same: W/H: 1024, 1024 Seed: 1 CFG Scale: 7.5 Sampling Method: Euler A (I understand that's not the best, but that's what the sampler uses) Sampling steps: 30 In theory, since the seed is the exact same, it should produce the same exact image between the sampler and Stable Diffusion, right? Any ideas what I'm doing wrong?

Vasiliy Bulanov

I understand that, however the link is only for 72 hours. I didn't quite understand how to host it permanently using gradio spaces

Alec Scott

Strangely enough, it seems like using `sd-scripts/sdxl_gen_img.py` to generate the images, with the exact same settings, generates differing results than Automatic1111. `sdxl_gen_img.py`'s results are definitely much closer to the sampled images, though

Dallin Mackay (edited)

Comment edits

2026-09-07 10:00 Could you in theory drop the second text encoder from an existing finetune when extracting lora from it by modifying extract_lora.py?
2024-03-19 10:48

Seeing Color Podcast

Should we always use 5200 for the Reg images? If we want to train something other than a man/woman, should we find 5200 class examples?

AmunRaw

I was hoping to see a comparison of the quality differences with text encoder on and off.

dxqbYD

people looking like clowns? I had that before in samples generated by Dreambooth, and it was related to the sampler, IIRC DDIM. Try another sampler?

dxqbYD

I need about 6000-8000 steps until the model gets really good, which can take about 4 hours on a cheap pod. Are these values to be expected, or am I doing something wrong? [meaning: 3000-4000 repetitions + reg] Have you experimented with faster settings that might be slightly lower quality? Thanks in advance

WHAT.AI.Studios

whats the best parameters for training a style dreambooth checkpoint,

dxqbYD

okay thanks, haven't looked into massed compute yet. batch size is probably a no-no with 16 GB. but the numbers I get don't surprise you? with LoRA I got decent results in 2000 steps (w/o reg though, reg made the quality worse with LoRA). Been running some tests because I want to buy me own machine, in case you are interested, for ~ 10000 steps: A4000: 5-6h | 0,5 it/s RTX3090: ~ 3h | 0,9 it / s RTX4080: ~ 3h | 1,0 it/ s RTX4090: ~ 1,7h | 1,7 it / s considering a 4070 Ti 16 GB, which is supposedly between the 3090 and 4080 in benchmarks, but not available on runpod for testing

dxqbYD

how much it/s do you have on which card? tests were done with community runpods. there could be some other factors except GPU with one of the machines, idk

Christina Frazier

Can you explain about facial expressions? I notice your face is very similar in all of your images. Also, your body positioning is always very similar ( unless you are riding a dinosaur ) Are facial expressions and angles of the body things you train or things you prompt for?

Diego Sienra

what was the best checkpoint from the training in your opinion? how many repetitions have the sample pictures on this post?

Kadir Nar (edited)

Comment edits

2026-09-07 10:00 The links here are not working. https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/comparison1.jpg https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/comparison2.jpg
2024-05-21 11:26

dazzyfizzle (edited)

Comment edits

2026-09-07 10:00 all the links to the old one redirect here. i am still on the old kohya and need the old presets. can you post a link to those ones?
2024-05-21 15:52

Pew

Dr. Gözükara, pardon my forwardness here; the fact is I don't know what I'm doing and therefore follow your guidance with much success. I'm a fan and supporter, though I would like to ask the following. I've read many times that training over several epochs produces higher quality outcomes versus same steps over the course of a single epoch. Can you please speak to this? I understand with your process, you still arrive at 10 checkpoints, though is that at a reduced benefit to say actually training 10 full epochs set to a defined number of steps each? I look forward to your insight and commentary!

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

you need to understand logic of epoch and step. 1 step = 1 time GPU cycle. with batch size 1 : it process 1 image. 1 epoch = 1 time processing every image in the training dataset. so if you have total 100 images, 100 steps will get you 1 epoch i can give you private lecture if you need. so you can ask any questions

kurlu

I would also be interested in this. As I understand the training situation, every epoch learns from the previous. Please explain the logic behind the repeats and the epochs. Thanks Furkan. You brought me within 2 weeks to almost mastering stable diffusion. Best educater for AI out there!!

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

thanks but as i said above. 1 step = 1 time GPU cycle. with batch size 1 : it process 1 image. 1 epoch = 1 time processing every image in the training dataset. so if you have total 100 images, 100 steps will get you 1 epoch . at every step it will modify model weights so that particularly trained image can be generated with more accuracy - but it will overwrite existing knowledge too. so you can look for terms of catastrophic forgetting in ai models with training

Jannik

Hello, can you make your 15 training images available? I just want to reproduce your results :) Thanks!

Pew

Thank you for explaining further.

Pew

Dr. Gözükara, do you happen to know when, date or version, that Kohya_ss made change to the Learning Rate and how it impacts training? I have tried looking at release notes, however, I don't see it mentioned and knew about this only when you brought it forward to the community. Context: I would like to download a prior version to archive and I'm not sure when the change happened. Thank you.

eduardo

Hello, getting an error whne starting training ths is waht i get load VAE: stabilityai/sdxl-vae Downloading config.json: 100%|███████████████████████████████████████████████| 607/607 [00:00 │ │ │ │ 743 │ args = parser.parse_args() │ │ 744 │ args = train_util.read_config_from_file(args, parser) │ │ 745 │ │ │ ❱ 746 │ train(args) │ │ 747 │ │ │ │ E:\PINOKIO\sd\api\kohya.pinokio.git\kohya_ss\sdxl_train.py:698 in train │ │ │ │ 695 │ │ │ save_stable_diffusion_format, │ │ 696 │ │ │ use_safetensors, │ │ 697 │ │ │ save_dtype, │ │ ❱ 698 │ │ │ epoch, │ │ 699 │ │ │ global_step, │ │ 700 │ │ │ text_encoder1, │ │ 701 │ │ │ text_encoder2, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ UnboundLocalError: local variable 'epoch' referenced before assignment steps: 0it [00:01, ?it/s] ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ E:\PINOKIO\sd\bin\miniconda\lib\runpy.py:196 in _run_module_as_main │ │ │ │ 193 │ main_globals = sys.modules["__main__"].__dict__ │ │ 194 │ if alter_argv: │ │ 195 │ │ sys.argv[0] = mod_spec.origin │ │ ❱ 196 │ return _run_code(code, main_globals, None, │ │ 197 │ │ │ │ │ "__main__", mod_spec) │ │ 198 │ │ 199 def run_module(mod_name, init_globals=None, │ │ │ │ E:\PINOKIO\sd\bin\miniconda\lib\runpy.py:86 in _run_code │ │ │ │ 83 │ │ │ │ │ __loader__ = loader, │ │ 84 │ │ │ │ │ __package__ = pkg_name, │ │ 85 │ │ │ │ │ __spec__ = mod_spec) │ │ ❱ 86 │ exec(code, run_globals) │ │ 87 │ return run_globals │ │ 88 │ │ 89 def _run_module_code(code, init_globals=None, │ │ │ │ in :7 │ │ │ │ 4 from accelerate.commands.accelerate_cli import main │ │ 5 if __name__ == '__main__': │ │ 6 │ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) │ │ ❱ 7 │ sys.exit(main()) │ │ 8 │ │ │ │ E:\PINOKIO\sd\api\kohya.pinokio.git\kohya_ss\venv\lib\site-packages\accelerate\commands\accelera │ │ te_cli.py:45 in main │ │ │ │ 42 │ │ exit(1) │ │ 43 │ │ │ 44 │ # Run │ │ ❱ 45 │ args.func(args) │ │ 46 │ │ 47 │ │ 48 if __name__ == "__main__": │ │ │ │ E:\PINOKIO\sd\api\kohya.pinokio.git\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.p │ │ y:918 in launch_command │ │ │ │ 915 │ elif defaults is not None and defaults.compute_environment == ComputeEnvironment.AMA │ │ 916 │ │ sagemaker_launcher(defaults, args) │ │ 917 │ else: │ │ ❱ 918 │ │ simple_launcher(args) │ │ 919 │ │ 920 │ │ 921 def main(): │ │ │ │ E:\PINOKIO\sd\api\kohya.pinokio.git\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.p │ │ y:580 in simple_launcher │ │ │ │ 577 │ process.wait() │ │ 578 │ if process.returncode != 0: │ │ 579 │ │ if not args.quiet: │ │ ❱ 580 │ │ │ raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) │ │ 581 │ │ else: │ │ 582 │ │ │ sys.exit(1) │ │ 583 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ CalledProcessError: Command '['E:\\PINOKIO\\sd\\api\\kohya.pinokio.git\\kohya_ss\\venv\\Scripts\\python.exe', './sdxl_train.py', '--pretrained_model_name_or_path=E:/SSD2.0/SUPER SD 2.0 Dependencies/stable-diffusion-webui/models/Stable-diffusion/sdXL_v10VAEFix.safetensors', '--train_data_dir=E:/downloads/TRAINMODEL-CHCEKPOINT_SDXL\\img', '--reg_data_dir=E:/downloads/TRAINMODEL-CHCEKPOINT_SDXL\\reg', '--resolution=1024,1024', '--output_dir=E:/downloads/TRAINMODEL-CHCEKPOINT_SDXL\\model', '--logging_dir=E:/downloads/TRAINMODEL-CHCEKPOINT_SDXL\\log', '--save_model_as=safetensors', '--full_bf16', '--vae=stabilityai/sdxl-vae', '--output_name=Tier1_24_GB_Slower', '--lr_scheduler_num_cycles=1', '--lr_scheduler_power=1', '--max_train_epochs=0', '--max_data_loader_n_workers=0', '--learning_rate=8e-06', '--lr_scheduler=constant', '--train_batch_size=1', '--max_train_steps=2000', '--save_every_n_epochs=1', '--mixed_precision=bf16', '--save_precision=bf16', '--seed=0', '--cache_latents', '--cache_latents_to_disk', '--optimizer_type=Adafactor', '--optimizer_args', 'scale_parameter=False', 'relative_step=False', 'warmup_init=False', 'weight_decay=0.01', '--max_train_epochs=0', '--max_data_loader_n_workers=0', '--vae_batch_size=2', '--bucket_reso_steps=64', '--save_every_n_steps=451', '--gradient_checkpointing', '--bucket_no_upscale', '--noise_offset=0.0', '--max_grad_norm=0.0', '--no_half_vae', '--train_text_encoder']' returned non-zero exit status 1.

Kraussian

Hi, I’ve just found & joined this community after following way too many guides with conflicting info and failing to train even a single LoRA to an acceptable quality. Is there a similar guide as this for LoRA training?

Kraussian

Ah I didn’t know “train a full model & then extract LoRA” was possible. Let me try that out! I’m using a RTX 4090 laptop GPU (which I understand is a misleading name because it’s totally different from a desktop RTX 4090 GPU) with 16GB VRAM.

SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts

16 GB is great. You should use OneTrainer config with it. It will work great. Extraction is explained here very well as well : https://www.patreon.com/posts/full-workflow-sd-98620163 and onetrainer config is here : https://www.patreon.com/posts/96028218 onetrainer tutorial is here : https://youtu.be/0t5l6CP9eBg onetrainer is more vram optimized so it will work better for you. use tier1_10.4GB_slow.json if tier1_15.4GB_fast.json works slow they are same quality

Kraussian

Ah, I understand now. Thank you for your help!

mypatreonemailacc

I'm seeing in Kohya Dreambooth training that small batches without batch accumulation works much better than large batches with batch accumulation. It sounds like your findings agree with this.

Pew

::looks at OneTrainer post|looks at this Koyha post|genuine appreciation, patience, AND anticipation mounts:: lol

Manpreet Singh

Are these new changes only I use Kohya. Previous SOTA configs used to be on OneTrainer. Any way to use these new findings in OneTrainer?

Pew

Holy wishful dream come true! You like me, Doc, you really like me!!

Pew

Funny, there's a reply on the OneTrainer post, asking your question in reverse; if they can use the updated OneTrainer configs for Kohya. In case you missed it, here are the updated configs for OneTrainer, just hours old. https://www.patreon.com/posts/onetrainer-xl-96028218

Manpreet Singh

Thank you both for the reply. Good to know that OneTrainer is still the bleeding edge.

A.S.

Will this workflow (Tier1_24_GB_Slower_v2.json) work with this Kohyaa installer? https://www.patreon.com/posts/for-runpod-kohya-84898806 I should just follow your video and it should work right? cause someone said here that it is not the latest version of Kohyaa but in this workflow you say on the latest update that Tier1_24_GB_Slower_v2.json is optimized for the latest Kohyaa...

A.S.

Aprox. how much time will it take, how much credit should i buy on runpod to fully train on SDXL a 75 image dataset with the 5200 regularization images if i do everything like in the tutorial video and do it on 24GB GPU just like in the video?

A.S.

in 1024 x 1024 size all

A.S.

When i want to train on a specific checkpoint on runpod, what is the fastest way to get that uploaded to the runpod after i have installed the kohyaa and want to give it the path of the specific checkpoint on the pretrained model panel? It does not let me upload it i think that the file size is too big. I am currently trying to upload it to the runpod, to the same folder as where the base sdxl model is after loading the 24gb config file but my checkpoint is 6 gb in size, how can i get it there so i can proceed? Please help me with this it is super important

A.S.

I did succeed with the model upload , Now how do i upload the 5000 REG images to RUNPOD ? for the SDXL finetune , i have them on googledrive in a folder and trying to do it with a notebook made for downloading large files but because it is a folder it does not recognize the share link from googledrive...

A.S.

Actually i have managed to get it there from googledrive, i ve used this: https://github.com/wkentaro/gdown , got the reg images also with zipping and installing jupyter archive then could unzip it now i am doing the training lets see how it goes.

A.S.

for 5200 reg images and about 92 training images , it says now checking cache validity 3854 and then checking latents is 1927, are these numbers correct you think?

A.S.

7520 steps overall, left the same settings as your config 40 repeat for 90 training images and 1 repeat for 5200 reg images , on Runpod this is an SDXL full fine tuning

A.S.

In your tutorial you kept the 40, should i redo it also if it is not as good and try it with 55 repeats on the 92 train images and 1 repeat on the 5200 reg images , while keeping all the same other settings loaded with the json? (SDXL)

A.S.

The volume has been exceeded (107%) and the training ended halfway, is it the Container Disk (Temporary) that i have to increase when renting out the pod on Runpod or the Volume Disk (Persistent) or both? or what should i do so i can proceed?

A.S.

yes it has ended already but which disk should i expand? Container Disk (Temporary) or Volume Disk (Persistent) or both?

A.S.

I ve redone everything with the 55 repeats carefuly looking at everything but the results are horrible, i have used the 96 images dataset with 55 repeats , added the 5200 reg images, did not change anything else about the json 24 gb config and carefully followed and watched your video 20times, these are the results my lora gave after replicating what you did : https://imgur.com/a/LChpT1H please help me with this, the dataset is 1024 x 1024

A.S.

It looks very overtrained, maybe you can tell what the issue is looking at the pictures,

A.S.

It is Sdxl full fine tune with dreambooth, ok i will try that

A.S.

This is the SDXL full fine tuning kohya via runpod, i did everything just like you said in the tutorial and here after regarding the change to 55 repeats for the dataset, am using all the files from the video shown, how do i extract the lora from the realvisxl fine tuned safetensors? Is there an option for it in the same stable diff. Web ui in runpod?

A.S.

Hello, I redid the training with the same settings as in the tutorial with 55 repeats , now as you said with the realvisxl checkpoint as base and here are the results https://imgur.com/a/m35eST9 i think it looks overtrained what do you see what can be the problem? maybe that 55 repeats is too much?

A.S.

how much repeats do you suggest for your config , for 94 images instead of 55?

Denn Landd

Is it possible to resume training for DB training? I know you can do it in LORA by checking save state and then providing network weights path, but can't see such path option in Dreambooth.

Denn Landd

Give last checkpoint as a pretrained base model? And what if I used 1 epoch like you suggested in this tutorial? Maybe I still didn'twrap my head around repeats/epoch/steps dependence and difference?

Lucy Moss

When lunching Runpod I get this: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. gradio 4.43.0 requires pydantic>=2.0, but you have pydantic 1.10.21 which is incompatible.

Regina Ciira

can I still use these configurations in 2025??

Regina Ciira

thankyou for replying.. i will get back to you after testing it