Home Creators Posts Import Register Favorites Logout

Downloads

Content

OneTrainer very best Stable Diffusion XL (SDXL) full fine tuning presets. 8.5 GB GPU is very sufficient and fast - June 2025 Updated

Patreon exclusive posts index to find our scripts easily, Patreon scripts updates history to see which updates arrived to which scripts and amazing Patreon special generative scripts list that you can use in any of your task.

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 zip file : OneTrainer_Installer_v5.zip

SDXL LoRA Extraction post updated : https://www.patreon.com/posts/112335162

Windows Requirements

Python 3.11.9, FFmpeg, CUDA 12.8, cuDNN 9.7+, C++ tools, MSVC and Git

Please have Python 3.11.9 for this app in additional to our regular Python 3.10.11 setup

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

https://youtu.be/DrhUHnYfwC0

12 January 2026 Update

OneTrainer now requires ffmpeg 7 development version to be installed

I have included it into zip file with automatic path set in Windows_Install_OneTrainer.bat

So zip file is now 69 mb but it works and you can make a fresh install properly

Make sure to follow requirements tutorial and install C++, MSVC and all others properly : https://youtu.be/DrhUHnYfwC0

22 August 2025 Update

OneTrainer Massed Compute properly update file added to zip file

Just run the command inside Massed_Compute_Instructions_READ.txt

20 June 2025 Update

I did lots of new tests and analyzed results of all of them : https://www.reddit.com/r/SECourses/comments/1ley3r9/since_recently_i_have_been_frequently_asked_of/

Based of these new tests, I have updated training configs

New presets

tier1_8.5_GB_slow_v4 , tier1_13.5_GB_fast_v4, tier1_17_GB_fast_v4

tier1_17_GB_fast_v4 is fastest and all of them have exactly same quality

I have updated presets and also made 1-click installers

How to use these configs quick tutorial : https://www.youtube.com/watch?v=yPOadldf6bI

You need to change workspace_dir, cache_dir, output_model_destination, edit your training concepts, change base model if you want

Now the attached zip file contains installers, training_presets, training_concepts, concept_setup_screenshots

VRAM Requirements are further decreased

Now you can SDXL DreamBooth / Fine Tune with only 8.5 GB VRAM GPUs

EMA is currently not working for some reason I have reported : https://github.com/Nerogar/OneTrainer/issues/889

You can also use Kohya DreamBooth

Kohya Installer here : https://www.patreon.com/posts/112099700

Kohya SDXL DreamBooth configs are here : https://www.patreon.com/posts/very-best-for-of-89213064

Big Kohya DreamBooth tutorial for FLUX (i have shown SDXL config usage too) : https://youtu.be/FvpWy1x5etM

Quick config use tutorial for Kohya DreamBooth : https://youtu.be/EEV8RPohsbw

Regularization / Classification

With SDXL I recommend regularization / classification images and we have manually prepared one here : https://www.patreon.com/posts/massive-4k-woman-87700469

Using regularization / classification significantly improves quality with SDXL but it doesn't work with FLUX yet due to bleeding

You can see how much improvement regularization / classification images usage brings here : https://medium.com/@furkangozukara/dreambooth-training-on-sdxl-anime-model-comparing-ground-truth-regularization-images-effect-572c72243431

Proper Example Training Images Dataset

Proper example dataset is here : https://www.patreon.com/posts/114972274

For GPU Poor Massed Compute

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

H100 has amazing price and speed but you can use like RTX A6000 ADA as well

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

Then select our image SECourses from Creator dropdown

Our image has OneTrainer pre-installed first run update icon

Then close opened windows and start OneTrainer from its icon

Follow this tutorial for step by step guide : https://www.youtube.com/watch?v=0t5l6CP9eBg

OneTrainer very best Stable Diffusion XL (SDXL) full fine tuning presets. 8.5 GB GPU is very sufficient and fast - June 2025 Updated

Patreon exclusive posts index to find our scripts easily, Patreon scripts updates history to see which updates arrived to which scripts and amazing Patreon special generative scripts list that you can use in any of your task.

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 zip file : OneTrainer_Installer_v4.zip

SDXL LoRA Extraction post updated : https://www.patreon.com/posts/112335162

Windows Requirements

Python 3.11.9, FFmpeg, CUDA 12.8, cuDNN 9.7+, C++ tools, MSVC and Git

Please have Python 3.11.9 for this app in additional to our regular Python 3.10.11 setup

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

https://youtu.be/DrhUHnYfwC0

22 August 2025 Update

OneTrainer Massed Compute properly update file added to zip file

Just run the command inside Massed_Compute_Instructions_READ.txt

20 June 2025 Update

I did lots of new tests and analyzed results of all of them : https://www.reddit.com/r/SECourses/comments/1ley3r9/since_recently_i_have_been_frequently_asked_of/

Based of these new tests, I have updated training configs

New presets

tier1_8.5_GB_slow_v4 , tier1_13.5_GB_fast_v4, tier1_17_GB_fast_v4

tier1_17_GB_fast_v4 is fastest and all of them have exactly same quality

I have updated presets and also made 1-click installers

How to use these configs quick tutorial : https://www.youtube.com/watch?v=yPOadldf6bI

You need to change workspace_dir, cache_dir, output_model_destination, edit your training concepts, change base model if you want

Now the attached zip file contains installers, training_presets, training_concepts, concept_setup_screenshots

VRAM Requirements are further decreased

Now you can SDXL DreamBooth / Fine Tune with only 8.5 GB VRAM GPUs

EMA is currently not working for some reason I have reported : https://github.com/Nerogar/OneTrainer/issues/889

You can also use Kohya DreamBooth

Kohya Installer here : https://www.patreon.com/posts/112099700

Kohya SDXL DreamBooth configs are here : https://www.patreon.com/posts/very-best-for-of-89213064

Big Kohya DreamBooth tutorial for FLUX (i have shown SDXL config usage too) : https://youtu.be/FvpWy1x5etM

Quick config use tutorial for Kohya DreamBooth : https://youtu.be/EEV8RPohsbw

Regularization / Classification

With SDXL I recommend regularization / classification images and we have manually prepared one here : https://www.patreon.com/posts/massive-4k-woman-87700469

Using regularization / classification significantly improves quality with SDXL but it doesn't work with FLUX yet due to bleeding

You can see how much improvement regularization / classification images usage brings here : https://medium.com/@furkangozukara/dreambooth-training-on-sdxl-anime-model-comparing-ground-truth-regularization-images-effect-572c72243431

Proper Example Training Images Dataset

Proper example dataset is here : https://www.patreon.com/posts/114972274

For GPU Poor Massed Compute

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

H100 has amazing price and speed but you can use like RTX A6000 ADA as well

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

Then select our image SECourses from Creator dropdown

Our image has OneTrainer pre-installed first run update icon

Then close opened windows and start OneTrainer from its icon

Follow this tutorial for step by step guide : https://www.youtube.com/watch?v=0t5l6CP9eBg

Files

Full Stable Diffusion SD & XL Fine Tuning Tutorial With OneTrainer On Windows & Cloud - Zero To Hero

In this tutorial, I am going to show you how to install OneTrainer from scratch on your computer and do a Stable Diffusion SDXL (Full Fine-Tuning 10.3 GB VRAM) and SD 1.5 (Full Fine-Tuning 7GB VRAM) based models training on your computer and also do the same training on a very cheap cloud machine from MassedCompute if you don't have such computer. SDXL Configs Updated to Better Version After 20 New Experiment ⤵️ https://www.patreon.com/posts/96028218 Tutorial Readme File ⤵️ https://github.com/FurkanGozukara/Stable-Diffusion/blob/main/Tutorials/OneTrainer-Master-SD-1_5-SDXL-Windows-Cloud-Tutorial.md Register Massed Compute From Below Link (could be necessary to use our Special Coupon for A6000 GPU for 31 cents per hour) ⤵️ * https://bit.ly/SECoursesMassedCompute * https://vm.massedcompute.com/signup?linkId=lp_034338&sourceId=secourses&tenantId=massed-compute Coupon Code for A6000 GPU is : SECourses 0:00 Introduction 3:54 Intro to instructions GitHub readme 4:32 How to register Massed Compute (MC) and start virtual machine (VM) 5:48 Which template to choose on MC 6:36 How to apply MC coupon 8:41 How to install OT on your computer to train 9:15 How to verify your Python, Git, FFmpeg and Git installation 12:00 How to install ThinLinc and start using your MC VM 12:26 How to setup folder synchronization and file sharing computer and MC VM 13:56 End existing session in ThinClient 14:06 How to turn off MC VM 14:24 How to connect and start using VM 14:41 When use end existing session 16:38 How to download very best OT preset training configuration for SD 1.5 & SDXL models 18:00 How to load configuration preset 18:38 Full explanation of OT configuration and best hyper params for SDXL 24:10 How to setup training concepts accurately in OT 24:52 How to caption images for SD training 30:17 Why my training images dataset is not great and what is a better dataset 31:41 How to make DreamBooth effect in OT with reg images concept 32:44 Effect of using ground truth regularization images dataset 34:41 How to set regularization images repeating 35:55 Explanation of training tab configuration and parameters 41:58 What does masked training do and how to do masked training and generate masks 44:53 Generate samples during training setup 46:05 How to save checkpoints during training to compare and find best one later 47:11 How to save your configuration in OT 47:22 How to install and utilize nvitop to see VRAM usage 48:06 Why super slow training happens due to shared VRAM and how to fix it 48:40 How to reduce VRAM usage before starting training 49:01 Start training on Windows 49:11 Starting to setup everything on MC same as on Windows 49:37 Upload data to MC 51:11 Update OT on MC 52:33 How to download regularization images 53:42 How to minimize all windows on MC 54:00 Start OT on MC 54:20 Setting everything on MC same as Windows 55:22 How to set folders on MC VM 56:31 How to properly crop and resize your training images 57:47 Accurate Auto1111 Models folder on MC 58:05 Copy file & folder path on MC 58:54 All of the rest of the config on MC 1:03:29 How to utilize second GPU if you have 1:05:45 Checking back again our Windows training 1:06:06 How to use Automatic1111 (A1111) SD Web UI on MC and Windows 1:11:35 How to use default Python on MC 1:11:55 Checking training speed and explaining what it means 1:12:13 How many steps we are going to train explanation 1:13:40 First checkpoint and howe checkpoints named 1:14:15 How to fix A1111 errors 1:15:44 How to start A1111 Web UI and use it with Gradio Live share and locally 1:17:45 What to do if model loading takes forever on Gradio and how to fix it 1:19:01 Where to see status of the training of OT 1:19:43 How to upload checkpoints / anything into Hugging Face for permanently saving 1:26:21 How to auto upgrade A1111 and install ADetailer and ControlNet extensions 1:29:10 How to use trained model checkpoints on Massed Compute 1:30:08 How to test checkpoints to find best one 1:32:15 Why you should use After Detailer (adetailer) and how to use it properly 1:34:48 How to do proper highres fix upscale 1:36:19 Why anatomy inaccuracy happens 1:37:07 How to generate images forever in A1111 1:38:02 Where the generated images are saved and download them 1:40:30 Super Important 1:45:16 Analyzing x/y/z checkpoint comparison results to find best checkpoint 1:48:20 How to understand if model is overtrained 1:52:27 How to generate different expressions having photos 1:54:53 How to do inpainting in Stable Diffusion A1111 1:56:34 How to generate LoRA from your trained checkpoint 1:58:03 Windows OneTrainer training completed so how to use them on your computer 2:00:24 Best SD 1.5 models Fine-Tuning / DreamBooth training configuration / hyper-parameters 2:03:50 How can you know you have sufficient VRAM? 2:05:36 What to do before terminating MC VM 2:06:55 How to terminate your VM to not spend anymore money 2:08:35 How to do style, object, etc training 2:09:47 What to do if your thin client don't synch

Comments

diffusers

thank you this is great - is it possible to run onetrainer on runpod?

Pete Stueve

Listen I hate to be that guy so stoked for whatever you put up but I was just just looking for a 1.5 guide if you find the time would be amazing as I am using 1.5 / animatediff but I deleted all my old lora/models thinking I was on to sdxl and now I find myself back

diffusers

Is there a template link? I've tried to find it but can't 🙃 haha thank youi

John Dopamine

Link for comparison.jpg above gives an error. Loaded your 18gb settings/optimizer earlier and first training test looked great. Thanks for researching one trainer - I always had issues getting it to train properly. Now I just need to figure out if I can train a concept (say likeness), then after add another and another etc, or if I need to create a large dataset to train all at once. Currently just trying the captions as one txt file and only putting the trigger name in the .txt. I assume that's sufficient for basic test.

Joel Maynard

is it very fast compared kohya?

Joel Maynard

oh nice, one more thing your hands and fingers also look better in this model, what is the reason for this?

seng sha

I have a batch of pictures that I want to fine-tune ckpt, but not a certain concept. What should I do?

Jhb

Whats is the prompt for Comaprison.Jpg

guangyu niu

comparing with kohya-ss, which one gets a better result?

guangyu niu

is the reg dataset still needed for using the onetrainer process?

Hassan Alhassan

my model is getting over trained quickly, i used the 18gb and 14.5 gb both are getting over trained

chriseppe

the results seem promising. Would love to see if it looks even more realistic without a surreal background. Did you simply generate the images without using Adetailer on top?

Hassan Alhassan

i have 25 images + 25 images of 2 different people (i tried them seperate and together all same result), 140 epouch, with regulators 4050 images, repeats 0.0045, i used your Json files 18gb and the optimiser. i used wd14 captioning, and now i am rerunning it with Blip 2, which captioning do you recommend from SOTA ?

Hassan Alhassan

this question might sound silly, i trained the Wurstchen model on using one trainer, and the model was in Diffusers format (folders with files inside them) when i dragged it to the models folder in SD.Next it didnt recognize it as a model, i tried to add it to the diffuser as well didint work, i never worked with diffusers before so not sure how to let the app know its there. i tried googling it but didnt find an answer that works

Hassan Alhassan

i tired the PixArt using all the methods they had on their web page non of them worked with me, i think the main one needs a GPU thats better than 4090, and the other trainings didnt work, specially with the limited information they provided for training

mike oxmaul

any runpod template where one trainer is already configured?

Hassan Alhassan

based on my findings, this is the list of rarest unbroken tokens with 4 letters, sorted by rarest to less rare. i use it because i usually train more than one person in the same model. though am not 100% sure if my findings are accurate. olis 148210 dits 148187 httr 148185 sown 148182 asar 148112 dori 148083 sohn 148080 suru 148053 veli 147979 sura 147938 toid 147937 onex 147929 apro 147864 wray 147756 maar 147740 peth 147733 enei 147719 ront 147694 inem 147689 gera 147680 miki 147676 rith 147663 fler 147602 tich 147582 minh 147547 arum 147545 enig 147543 hiko 147521 teer 147461 nery 147410 ohwx 146806

Hassan Alhassan

Any Idea on how to train the model for putting it in Civit, (not my photos) i tried training it with 3000 photos, but when i reach 40k steps it because like a bad-cartoonish look, once i pass 40k it doesn't look like good at all

Hassan Alhassan

i captioned them using open AI xxl if i remember the name well, i am redoing it just finished captioning for 9000 images, its taking a lot of time to caption with LLaVA but it seams worth it

Meito

could you make a quick tutorial on how to add the concepts and class images, its not working for me

likewisemarien

I dont know what I'm doing wrong, the face is only slightly similar when I trained it last night. It doesnt work

gao yu

could you make a quick tutorial on how to selecting the reg images for training a LORAFACE model to create a character of my 90-year-old grandmother.

Nenad Kuzmanovic

Are you planning to make a Runpod installer? I know you are bussy, but i can't resist asking :-)

Anduvo

Hi Furkan, first time trying OneTrainer instead of kohya to train SDXL dreambooth (fine tuninig). So I replaced the optimizer json, put the other presets in the presets folder. Now I took an old dataset with captions which gives good results in kohya (80 images), but using OneTrainer with your 14.5gb preset doesn't produce a correct model. It just produces kind of abstract images that doesn't resemble anything. Do you have any idea what I might be doing wrong ?

Anduvo

Couldn't make a video but sent you some screenshots via email

Nenad Kuzmanovic

It is not opening template, but GPU Cloud page... I've tried with search one trainer but no results...

Stefan Dragisic

Seams that latest tier1_sdxl present has an error: ~~~~~~~~~~~~~~~~^^^^^^ KeyError: "{'__version': 0, 'optimizer': 'ADAFACTOR', 'adam_w_mode': False, 'alpha': None, 'amsgrad': False, 'beta1': None, 'beta2': None, 'beta3': None, 'bias_correction': False, 'block_wise': False, 'capturable': False, 'centered': False, 'clip_threshold': 1.0, 'd0': None, 'd_coef': None, 'dampening': None, 'decay_rate': -0.8, 'decouple': False, 'differentiable': False, 'eps': 1e-30, 'eps2': 0.001, 'foreach': False, 'fsdp_in_use': False, 'fused': False, 'growth_rate': None, 'initial_accumulator_value': None, 'is_paged': False, 'log_every': None, 'lr_decay': None, 'max_unorm': None, 'maximize': False, 'min_8bit_size': None, 'momentum': None, 'nesterov': False, 'no_prox': False, 'optim_bits': None, 'percentile_clipping': None, 'relative_step': False, 'safeguard_warmup': False, 'scale_parameter': False, 'use_bias_correction': False, 'use_triton': False, 'warmup_init': False, 'weight_decay': 0.0}" when I load it

Wktra

Can you please add to the post how many training images you used and how many regularization images you used? It's very important.

Wktra

Thank you for the clarification!

Wktra

You wrote "Prompt path examples are a txt file that contains ohwx man (training images rare token + class) as text and a txt file that contains man (reg images class) as text" ... This is unclear. What this tells me is that you don't caption each training image? You just use one text file that ONLY has the words "ohwx man" for each training image? This is confusing because in these comments, you mention the we should use the LLava captioner??? Does one text file contain all of your training captions? Could you please give an example of what the training text file looks like?

Wktra

I just want to be clear: so ALL of your 15 images only point to one text file. And the one text file only has "OHWX man"? No other words, no other descriptions?

Wktra

Also, why don't you turn on bucketing for different ratios of training images?

Wktra

Oh!!! Then it's time for me to experiment with this too!

Wktra

I'm curious, thanks to your setup files, I am FINALLY able to train SDXL with my 15GB 3080. Do you have any guides for SDXL Lora training with Onetrainer?

Anduvo

do you use kohya or other tool to extract the lora ?

Wktra

I think you're right. Do you use the same settings as SD1.5 on kohya to extract? Minimum difference: 0.00001 and Rank 128 and select SDXL?

Anduvo

Hi Furkan, your kohya sdxl presets train both text encoders and the oneTrainer presets only text encoder 1 , is there are reason or a benefit for excluding the second text encoder in oneTrainer ?

Anduvo

I see, I must had an older version of your parameters, I will re-download

Wktra

I trained my own original anime character using your methods, but the difference is that I used 100 training images and no regularization images. The results are good. It's very difficult to decide which epoch is best. It takes 12 hours to train and test results so I have to be careful about the details I change so I can improve it.

Wktra

Also, I get errors when I choose the SDXL VAE in Onetrainer. So I trained without it. The results are still good, but does anyone else have this problem?

Wktra

Do you have any advice on training an art style? Would I use the same settings as your presets? Also, what is the minimum number of training images to use for a style? Any tips on captioning for styles? Are regularization images necessary? Again, thank you for your hard work.

Wktra

Thank you. I started training with 400 images this morning. I think this will take more than 24 hours. 😭 200 epochs...

Anduvo

Hi Furkan, do you know why when I train a dreambooth model with OneTrainer and it makes good images but when I extract the lora with kohya, the lora makes undertrained images?. lora 64 alpha 1

Anduvo

It works, thank you

Felipe Cortes

Hello, using onetrainer, I tried to create a checkpoint, but for some reason it says it can't find the basemodel (onetrainer error I guess), so I created an SDXL lora instead, which worked quite well for me, creating different situations and different clothes but using lora it does not apply styles, 2d, art etc, it only looks photographic, what do you think is the reason for that? Why don't I use regularization images? Why is the text encoder turned off? Or why does the description of my images of a man say "a man" and not "a ohwx man"? Or something else? thank you

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

hello. sadly i cant tell details without seeing exactly what you are doing. but text encoder 1 is trained and text encoder 2 is not since i did extensive testing and training text encoder 2 only made the model lose its generalization meanwhile didn't improve similarity

John Tomlinson

Regardless of which Tier presets I use I get the CUDA out of memory error. I have a 16GB card and have ran other trainings with different settings just fine before. What setting in the presets may be doing this? I'm mainly trying the 13GB one.

John Tomlinson

How do I verify my VRAM usage? As far as I know it's the latest but I'll check. I'm on the discord as OhTheHueManatee.

Pablo Montero

Where can I find more info about this extraction process?

Pablo Montero

Hello Mr. Furkan, it looks like OneTrainer cannot load the selected model, what's wrong? Paste long console message: activating venv C:\AI\OneTrainer\venv A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\models\lora.py:300: FutureWarning: `LoRACompatibleConv` is deprecated and will be removed in version 1.0.0. Use of `LoRACompatibleConv` is deprecated. Please switch to PEFT backend by installing PEFT: `pip install peft`. deprecate("LoRACompatibleConv", "1.0.0", deprecation_message) C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\models\lora.py:384: FutureWarning: `LoRACompatibleLinear` is deprecated and will be removed in version 1.0.0. Use of `LoRACompatibleLinear` is deprecated. Please switch to PEFT backend by installing PEFT: `pip install peft`. deprecate("LoRACompatibleLinear", "1.0.0", deprecation_message) Traceback (most recent call last): File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 275, in load model = self.__load_internal(model_type, weight_dtypes, model_names.base_model, model_names.vae_model) File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 56, in __load_internal with open(os.path.join(base_model_name, "meta.json"), "r") as meta_file: FileNotFoundError: [Errno 2] No such file or directory: 'C:/AI/SD_Models/Stable-diffusion/SDXL-based/SDXL/formulaxlXLComfyui_v20Pruned.safetensors\\meta.json' Traceback (most recent call last): File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 282, in load model = self.__load_diffusers(model_type, weight_dtypes, model_names.base_model, model_names.vae_model) File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 97, in __load_diffusers tokenizer_1 = CLIPTokenizer.from_pretrained( File "C:\AI\OneTrainer\venv\lib\site-packages\transformers\tokenization_utils_base.py", line 1925, in from_pretrained raise ValueError( ValueError: Calling CLIPTokenizer.from_pretrained() with the path to a single file or url is not supported for this tokenizer. Use a model identifier or the path to a directory instead. Traceback (most recent call last): File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 428, in load_config config_dict = cls._dict_from_json_file(config_file) File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 550, in _dict_from_json_file text = reader.read() File "C:\Python3106\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 25705: invalid start byte During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 289, in load model = self.__load_safetensors(model_type, weight_dtypes, model_names.base_model, model_names.vae_model) File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 237, in __load_safetensors pipeline.vae = AutoencoderKL.from_pretrained( File "C:\AI\OneTrainer\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\models\modeling_utils.py", line 569, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( File "C:\AI\OneTrainer\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 432, in load_config raise EnvironmentError(f"It looks like the config file at '{config_file}' is not a valid JSON file.") OSError: It looks like the config file at 'C:/AI/SD_Models/VAE/sdxl_vae.safetensors' is not a valid JSON file. Traceback (most recent call last): File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 428, in load_config config_dict = cls._dict_from_json_file(config_file) File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 550, in _dict_from_json_file text = reader.read() File "C:\Python3106\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 25705: invalid start byte During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 296, in load model = self.__load_ckpt(model_type, weight_dtypes, model_names.base_model, model_names.vae_model) File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 186, in __load_ckpt pipeline.vae = AutoencoderKL.from_pretrained( File "C:\AI\OneTrainer\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\models\modeling_utils.py", line 569, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( File "C:\AI\OneTrainer\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\AI\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 432, in load_config raise EnvironmentError(f"It looks like the config file at '{config_file}' is not a valid JSON file.") OSError: It looks like the config file at 'C:/AI/SD_Models/VAE/sdxl_vae.safetensors' is not a valid JSON file. Traceback (most recent call last): File "C:\AI\OneTrainer\modules\ui\TrainUI.py", line 466, in __training_thread_function trainer.start() File "C:\AI\OneTrainer\modules\trainer\GenericTrainer.py", line 116, in start self.model = self.model_loader.load( File "C:\AI\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 304, in load raise Exception("could not load model: " + model_names.base_model) Exception: could not load model: C:/AI/SD_Models/Stable-diffusion/SDXL-based/SDXL/formulaxlXLComfyui_v20Pruned.safetensors

Pablo Montero

apparently the VAE must go as Diffuser Model. You can use in the VAE box: madebyollin/sdxl-vae-fp16-fix

Pablo Montero

and why don't you use elaborated captions with OneTrainer?

Mario Santiago

Are these settings intended for characters, art styles or concepts?

John Dopamine

The OneTrainer developer has added support for "Stochastic Rounding" in the optimizer settings for Adafactor. This new rounding method was found to be essential for any training of Stable Cascade using bfloat16 (only way on consumer gpus). Without this rounding method no training would be learned until the LR was put very high so the little values that were getting rounded down to zero would instead round up to a value. Anyway, this new toggle/feature definitely has an effect on SDXL training (and probably less so SD1.5) as well. Perhaps it even fixes the issue where one of the SDXL text encoders doesn't seem to learn much at all during training while the other does. 1e-05 is suuuuper quick to converge w/ stochastic rounding enabled which could be good or bad. Basically it's just different and quicker. Stability or any company training a base model would use float32 or mixed precision to train so they don't have this issue. (Actually: Can you say if you trained using fp16, bfloat16, or even float32/mixed when using Runpod to get these best case settings? They didn't really match w/ the LR values I'd come to be comfortable with. However maybe w/ the rounding fix I will have to try again w/ the 1e-5 unet / 3e-6 txt-encoder LRs) Curious if you would ever possibly revisit your trials on this and see if "Stochastic Rounding" can better dial in SDXL training. If so a new learning rate for UNet and TXT encoders will definitely be required. I'm personally trying between 1e-06 and 1e-05 - but that's w/o touching the txt encoder rates (just keeping them all the same). If you ever get a moment to rerun a few ballpark trials to give a thought on this new "fix" that came about due to Cascade failing it would be much appreciated. "John Dopamine"

Javi dltr

how do we use captions here for reg and for data?

Javi dltr

in sdxl config 1 ema is off but decay is 0.999?

John Dopamine

There's a new branch (just about merged) w a new "fused base" feature that allows for a significant decrease in the amount of VRam needed to train. If you haven't seen this yet, keep an eye out. With 24gb you can now train w float32, or large batch sizes like 14. It also should allow people who have cards under 16gb train now also. Mentioning this after seeing you updated after reviewing stochastic rounding. This discovery kinda came from that (which came due to Cascade not training at all). Perfect timing w SD3 right around the corner (please let them not backtrack).

Karl B

I have a question, on the Onetrainer wiki it says if "latent caching" is on as it is in your file, then you need to use more than 1 on the "image variants" setting under concepts. I have about 50 photos ready to train, Onetrainer doesn't really explain what do set that number to. Any ideas?

Kenji Klimawhatski

Hi, how can "tier2_SDXL_slow_13_GB" be tweaked to work on a 12GB card?

Kenji Klimawhatski

Btw, are the configs interchangeable between Kohya and OneTrainer? And what's the difference between tier 1 and 2?

George Gostyshev

That's really great work done! Appreciated) OneTrainer big tutorials could be nice. Also, can I ask\suggest to sometimes add not so big videos? Like videos about some small but useful technics. Anyway thanks again)

Marian Ban

Hi, what are the correct settings for network rank and dimension? These are not included in the json files. I'm asking about the Kohya settings. Thanks

Fruit

Hello Mr. Furkan, thank you for your great work. it looks like OneTrainer cannot load the selected model, what's wrong? I have already read comments. but it doesn't work. Traceback (most recent call last): File "C:\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 432, in load_config config_dict = cls._dict_from_json_file(config_file) File "C:\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 554, in _dict_from_json_file text = reader.read() File "C:\Users\asd\AppData\Local\Programs\Python\Python310\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 25705: invalid start byte During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 296, in load model = self.__load_ckpt(model_type, weight_dtypes, model_names.base_model, model_names.vae_model) File "C:\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 186, in __load_ckpt pipeline.vae = AutoencoderKL.from_pretrained( File "C:\OneTrainer\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\OneTrainer\venv\src\diffusers\src\diffusers\models\modeling_utils.py", line 567, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( File "C:\OneTrainer\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 436, in load_config raise EnvironmentError(f"It looks like the config file at '{config_file}' is not a valid JSON file.") OSError: It looks like the config file at 'C:/3webui/webui/models/VAE/sdxl-fp16-.vae.safetensors' is not a valid JSON file. Traceback (most recent call last): File "C:\OneTrainer\modules\ui\TrainUI.py", line 477, in __training_thread_function trainer.start() File "C:\OneTrainer\modules\trainer\GenericTrainer.py", line 113, in start self.model = self.model_loader.load( File "C:\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 304, in load raise Exception("could not load model: " + model_names.base_model) Exception: could not load model: C:/3webui/webui/models/Stable-diffusion/animagine-xl-3.1.safetensors If i use SDXL 1.0 base model, File "C:\OneTrainer\venv\src\diffusers\src\diffusers\configuration_utils.py", line 436, in load_config raise EnvironmentError(f"It looks like the config file at '{config_file}' is not a valid JSON file.") OSError: It looks like the config file at 'C:/3webui/webui/models/VAE/sdxl-fp16-.vae.safetensors' is not a valid JSON file. Traceback (most recent call last): File "C:\OneTrainer\modules\ui\TrainUI.py", line 477, in __training_thread_function trainer.start() File "C:\OneTrainer\modules\trainer\GenericTrainer.py", line 113, in start self.model = self.model_loader.load( File "C:\OneTrainer\modules\modelLoader\StableDiffusionXLModelLoader.py", line 304, in load raise Exception("could not load model: " + model_names.base_model) Exception: could not load model: C:/3webui/webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors

Fruit

Yes, i have seen your video many times. I don't know why but if i don't select vae file, it is okay.

Fruit

Hello Mr. Furkan! Thank you. It works. I ran into another problem: the saved model had learned the style of the dataset perfectly, but it didn't remember the details of the character (hairstyle and little hair ornaments). If my goal is to train multiple characters on an animation model, what would be a good approach to use?

mike oxmaul

Why not use EMA? Previous post said using EMA made this better than Kohya.

Tom Bloomingdale

Hello - this is working in that it is training and finishing. The results are fairly consistent and look like the same person (kind of) but nothing like the me (the subject). I have tried a few different models as a base, and gone through the settings as you describe in your video/writings several times. Any idea why I am not getting results as expected? This is SDXL, the tier1_10.4GB_slow settings, 200 epochs.

mike oxmaul

when training on custom models like realistic stock photo 2 or realvis4, do i need to specify the VAE still? Some models say it's baked in, others say nothing. what difference would i get from having no vae to having the vae? is there a best one for sdxl? i see there are lots of different revisions.

mike oxmaul

What if the model doesn't say its got it baked like these ones?

Tom Bloomingdale

I wasn't using that and will try - but the faces weren't bad they just don't look like me, they have a consistent look but not of me

Tom Bloomingdale

That seems to add detail but to a face that looks nothing like mine - the face is consistent, but it is not my face.

George Gostyshev

I do have 390 images to train. It's all separated by type: animals, characters, creatures, icons, illustrations. What's setting I should care most with provided configs? Could you please write some tips on what settings will you change to what? Apprciated

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

you just need to caption them properly according to your desired results. what you want to achieve in the end determines how you should caption. you want to fine tune model? what you want to do? I can also give you a private lecture if you are trying to make a commercial model

George Gostyshev

Yeah I want to create a full fine-tuned model and then extract lora from there. I've already did some and wanted to compare my results with your latest configs. It's not for commercial use - just for my own needs - trying to create nice stylized lora with images I like) My main question is about steps, epochs and such. Because with 15 pics I understand how it will go and in what time and with such amount of pics - I can't. All images are captioned. Previous model I did with same dataset in Kohya made in 14 hours on runpod a6000...

Kay Tichelmann

hi mr. furkan, the woman-regulation zip is not downloadable anymore

Kay Tichelmann

yes, 9it seemed to have been a hccup on patreons side :) Thanks alot

Visalyar

I know you claim finetuning and extracting is the best, but I would very much still prefer to tinker with LoRA's tbh, Had it down pretty perfect for SD1.5 and like to do the same for SDXL. Always worked with prodigy, could train a pretty good lora in half an hour or so and then perfect it further by merging with other LoRA's. Any suggested settings and have you messed around with prodigy in onetrainer?

Artie Medvedev

Hello. Thanks for presets. I have a question. Let's say I have 20 images of a person to use for model finetuning in OneTrainer. Also I have 5200 regularization images of a person from your dataset. To use "dreambooth" method I have to create another concept with those 5200 regularization images and ratio of 0,0769 in OneTrainer. The question is: will the OneTrainer choose random regularization images set for every epoch (or will OneTrainer somehow shuffle class images iteratively during training)? Also have you checked if class images generated by the base model give better results with OneTrainer then real images from your dataset?

Hendrik Luehrsen

First off, thank you for doing all that research! The google colab times feel like a lifetime ago. To my question/finding: I am currently training base SDXL with dreambooth using tier1_slow. My set has 20 masked images. 200 epochs take me about 7 hours on my 3090TI. I've found that after around 120 images the samples begin artefacting, meaning the model is somewhat fried. But the likeness at 120 is still far away. Have you made any experiments with a drastically lower training rate? How about masked training, does the mask lead to higher learning and faster overfitting?

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

i recently reduced learning rate on kohya since it was broken. it is reduced to 0.000008 from 0.00001 for u-net. masked training didn't change learning rate for me. what masked training does that it generalize model better but then anatomy problems occur. i made a comparison here : https://medium.com/@furkangozukara/onetrainer-fine-tuning-vs-kohya-ss-dreambooth-huge-research-of-onetrainers-masked-training-d2694126ef4e

Hendrik Luehrsen

I've just found, that for my training set even 0.000008 seems too high. I've had good results on 5e-6 with around 75 epochs. After that it was starting to artefact. I'm now down to 1e-6. Now I just have to wait a few hours to see what happens. :D

reaper557

Finally going to try for a SDXL model -> LoRA after getting a successful SD1.5 last night. It is a relief to have access to your research, configs, testing, and examples when starting something new. Every project now begins with a quick check of your Patreon Exclusive Index list for related topics. Thank you very much, your hard work is making my life so much easier! (>'.')>[<3]

Zach Shukan

I used your settings to do an SDXL finetune with OneTrainer and they worked great, but is there a way to get a LoRa from that checkpoint that gets generated?

Ezequiel Casas

Caching the 5200 reg images before each new training is too slow, it's normal? I have a 3090 and an HDD 7200 rpm, also a SSD maybe I will have to pass the dataset or one trainer itself to an SSD?

Daniel Limia Aspas

Where are the new attachements? I can't seem to find them

EvanGuo

could u test lora?

EvanGuo

onetrainer or kohya_ss,which one is better?

Cemil Hacimahmutoglu

Hocam bu train işi artık iyice karıştı valla. Sil baş yaparak bulduğunuz en sağlam ayarlarla ve yönlendirmelerle yeni bir video ile bu işi sonlandırsanız çoook iyi olur.

Pew

Hey Doc, do you know if these new settings would apply to finetuning a Pony model or does that require a different approach than what your scripts and training entails?

Neto Leutwiler

Hi Dr Furkan, thanks a lot for your updates. Can we apply this best configs on kohya as well? If its possible we use this file "tier1_15.4GB_fast_v4" or the other one of kohya "Tier1_48_GB_Faster" with some modifications?

PM

Pony trained fine with his previous settings, I havent tried the new ones. A trick for more photorealistic images, use a realistic pony merge AND train again on a regular SDXL model of choice (so two separate trained models in the end). Then in only A1111 or Forge (only works on these as far as I know, because of how they handle refiners), use your trained pony as base. Set steps to 50 (yes, that's a lot). Check the Refiner checkbox, set your SDXL trained model as the model in the refiner, and set the switchover to 0.6 (or you can play around with values but 0.6 is a good start). For best results, enable Adetailer and use the faceyolos model, and under adetailer settings drop down "Inpaint" and select "use separate checkpoint" and select the SAME SDXL trained model that you're using as a refiner. Write your prompt, and boom, flexibility of pony with the realism of SDXL.

juggz143

Training pony is the exact same as training xl.

Christopher Ritter

Can these configs be used to train a style as well as a person? I downloaded 50 images of people wearing costumes and trained an SXDL LoRA model along with 5200 regularization images. Everything cropped to 1024x1024. After 8 hours of training, I couldn't spot any difference when I tested the LoRA model.

Christopher Ritter

Thanks for pointing that out! I was using 'Fine Tune' instead of 'LoRA' in OneTrainer. 🫢

Maxiking

Thanks for all the detailed informations, you are doing really good work! I have tried to go through the massed compute route with 48 GB VRAM and used the newest 15.4 GB json file. Also I have disabled the gradient checkpointing as you have shown in the video. But nevertheless I get only 2.4s/it and not 1.4s/it in training, as you have mentioned in your post. As I have seen in nvitop, also only 34 GB from the 48 GB are used. Do you know, why there could be such a difference in the iteration duration, even if I have done the configuration the same as you have done?

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

The explanation of this that either OneTrainer some new coding slowed it down or the latest libraries they use for SD3 and FLUX . 2.4 second without gradient checkpointing is too slow. you can enable SDPA / xformers attention but it slightly reduces quality

Nikola Popovic

Regards, I have a relatively simple question, lets say we want to do a training for 2 persons. One is man other is female (kids for example). How can we approach it ? tag one person with token A, other with Token B? . If different gender, what would be reference set?

Nikola Popovic

Thanks for answer, what about regularization? Use man 5200 images for example and woman images at same time, tag them both as man and woman

abaj006

I have been getting great results with your Preset "tier1_15.4GB_fast_v4.json" and following your tutorial video. One question, do the Regularization images and the Training Images need to have the same aspect ratio when using OneTrainer?

abaj006

Never mind, watched your video again, the part about the Bucketing with OneTrainer.

Film Maker Official

Hi Dr Furkan, thanks a lot for your contribution. The training speed of finetuning seems much slower than the lora training. Are there any configs that speed up the finetune traing? The gpu memory is not an issue, I may rent 40GB or 80GB GPUs for training. Looking forward to hearing for you.

Film Maker Official

Hi Dr Furkan, thanks for your reply. I use 4090 gpu to train. For sdxl finetuning, the speed of "tier1_10.4GB_slow_v4.json" or "tier1_15.4GB_fast_v4.json" are similar, about 1.10it/s, gpu memory are 10.4GB and 15.4GB respectively. For lora training, I use kohya to train, speed is about 4.22it/s, gpu memory is about 18GB. Some of the lora config items are: network_alpha = 1 network_dim = 48 network_module = "networks.lora" network_train_unet_only = true train_batch_size = 1 gradient_accumulation_steps = 4 lr_scheduler = "cosine" unet_lr = 0.001 mixed_precision = "fp16" loss_type = "l2" cache_latents = true no_half_vae = true xformers = true The speed difference between finetuning and lora may be cause by the network size. In lora config, I only use network_dim=48, which is much smaller than your suggesion of network_dim=256 Could you share the best SDXL lora training config for OneTrainer? I like OneTrainer than kohya. OneTrainer saves everything during training, and can resume training easily. But kohya seems only can resume the weight, but the scheduler's state are lost when resuming training.

Film Maker Official

Thanks for your reply. You mention the quality may decrease when using xformers. Do you have some example images on the quality degradation?

bao tran quoc

Hi Dr Furkan, thanks a lot for your works. but i have an error. I have server connect by ssh. but i cannot run UI , so I train by cmd: ./run-cmd.sh train --config-path=configs/tier1_15.4GB_fast_v4.json. OneTrainer/modules/util/config/TrainConfig.py", line 697, in to_pack_dict with open(config.sample_definition_file_name, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'training_samples/samples.json' where can i find samples.json? thanks a lot

D Dunn

any idea why my samples are of men when Im training a girl? both concept txt files say girl

Lee

Hi...I successfully trained via OneTrainer last year using your video tutorial, thanks for such useful information. At that time, with a 60mb internet connection the upload of files to Massed Compute was unbearably slow! Since that time I have upgraded to 900mb full fibre and was looking forward to doing some further training. However, upload speeds to MC are similarly terrible. Is this normal, are MC upload speeds from local machines via Thinclient typically very slow...or have I missed a setting somewhere that might improve the situation. Frustrating to lose an hour or two to uploading files before any training can be started! Many thanks.

Lee

Actually, my problem is with the upload of the many regularisation images (and to lesser degree the images to be trained) which number 1000's, but I guess Google Drive is a good option, I'll give that a whirl and hope for a bit more speed :-)

Pablo Montero

Hi Furkan, so far your research, what's the best tool and configuration for a Product with logos (a bottle of parfume for example)? I have 15 images at 4K, and will use slices to enlarge the dataset and provide more information. Did you research this technique?

yui

When I increase the batch_size, how should I set the learning_rate? For example, when batch_size=4

yui

Does increasing the batch_size improve quality and speed? For example, with the 8.5G slow configuration, setting batch_size=4 actually consumes 16G of VRAM. How does this compare to the 16G fast configuration in terms of results?

yui

Interested in trying out Chroma1 training? OneTrainer has recently added support for Chroma1.