NokiMo
Furkan Gözükara
Furkan Gözükara

patreon


How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training

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)

=======

20 June 2025 Full Post Remade / Updated

FLUX LoRA Extract

SDXL LoRA Extract

FLUX LoRA Extract

SDXL LoRA Extract

How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training How to Extract LoRA from SDXL & FLUX Fine Tuning / DreamBooth Training Full Tutorial and Comparison Between Fine Tuning vs Extraction vs LoRA Training

Comments

i think almost same quality but fp16 more preferred

Furkan Gözükara

Is it fp16 better than bf16?

Juanmyth

yes you can extract https://medium.com/@furkangozukara/stable-diffusion-xl-sdxl-full-dreambooth-model-vs-lora-extraction-comparison-ce0051c10d51

Furkan Gözükara

Is it possible to extract SDXL Lora in the same way? If there are any settings that need to be adjusted differently from FLUX, please let me know. Thank you always for your guidance.

Leo

what is your file size? safetensors_rust.Safetensor

Furkan Gözükara

Hello Dr Furkan, I've been trying to extract lora from my fine-tuned model and I end up with this Error: Traceback (most recent call last): File "C:\AI\Kohya\Kohya_GUI_Flux_Installer_v46\kohya_ss\sd-scripts\networks\flux_extract_lora.py", line 219, in svd(**vars(args)) File "C:\AI\Kohya\Kohya_GUI_Flux_Installer_v46\kohya_ss\sd-scripts\networks\flux_extract_lora.py", line 87, in svd value_t = f_tuned.get_tensor(key) safetensors_rust.SafetensorError: File does not contain tensor model.diffusion_model.double_blocks.0.img_attn.proj.weight I have followed your finetuning tutorial and have amazing results, but not sure what I am missing here, I've used the same method you explained here on a random finetuned model on civitai and it works fine!!

Mojahed Rudainee

some people recently reported similar stuff. perhaps the scripts become broken.

Furkan Gözükara

I've done everything according to your instructions. The fan-tuned model itself gives good results, but LORA gives bad similarity and some artifacts kind of noise on all photos. (And also when increase the weight from 1.1 to 1.5, the quality becomes just disgusting, but the similarity increases)

Vadim

yes you can use i already made tutorial for this :D https://www.patreon.com/posts/115376830

Furkan Gözükara

Hello Doc ! can we use the merge_lora script to convert an extracted LoRa from BF16 (or FP16) to FP8 ? Is it going to reduce its size drastically here as well ? If this is the case, this would allow to keep a high rank without compromising too much on storage size. Thanks for your work !

Hugo Morosini

so you extracted with 640 rank, quantile 1 and still not matching? in my case 1.1 weight was very close

Furkan Gözükara

Hello Furkan, I have tried all possible settings, but the extracted LoRA file is simply unusable. I trained a DB model of a person, and the results are excellent, but the LoRA shows some similarity at 1.20 but hardly matches the DB results. I get better results when I train the LoRA directly. The dataset consists of 2,500 photos.

puk

wow that is huge. the maximum i needed was 1.1

Furkan Gözükara

I was successful - but I have to weight the LORA to 2.75-3 in order to get my subject at all. this affects any other loras i want to run simultaneously...

Jonathan Streeter

we dont know for sure yet

Furkan Gözükara

Please Show me where do you read Open Sourcd? These Results arent possible to achive with Open Source and consuma GPUs.

CanE

maybe same style license as dev model

Furkan Gözükara

we are waiting

Furkan Gözükara

Black Forest Labs says Yes https://blackforestlabs.ai/up-next/

JamZam WamBam

It wont be Open Source.

CanE

awesome

Furkan Gözükara

Solved with the script "Update_Kohya_and_Fix_FLUX_Step2"

Pablo Montero

Ey Furkan, I have last Kohya v24.1.7 installed but it doesn't show the "Extract Flux LORA" tab. Any clue? Thanks

Pablo Montero

it is almost same as rtx 3090 but half of 4090

Furkan Gözükara

I read a6000 is half the speed of 3090 and fourth the speed of 4090. It just have more vram

Hung Do

sadly i dont know how to do. i asked this kohya and he skipped my question :D i think he doesnt know either

Furkan Gözükara

Do you have any idea how to convert my UNET fp16 checkpoint into GGUF Q4 quantization?

Member

A6000 has speed of like rtx 3090 sadly. hard to tell if it fits into 24 gb, rtx 4090 would be at least 2x faster, if doesnt fit than rtx a6000 would be better. for example current fine tuning of FLUX doesnt fit into 24 gb thus A6000 is faster on there. personally i am gonna wait RTX 5090 TI which is rumored to be at least 32 GB

Furkan Gözükara

Hi Dr.Furkan. I have a question. I've heard that Black forest labs will be releasing their open source FLUX Video model soon so I'm looking to upgrade my video card but I'm not sure if I should get a RTX 4090 or a RTX A6000. Is a RTX A6000 worth the extra money? Thanks.

JamZam WamBam

dreambooth will generate a new full model (23.8 GB). this is for people who wants to still keep lora but have better quality

Furkan Gözükara

To confirm this is to use the lora we trained from your flux Kohya gui tutorial and input into dreambooth tab or how to train a new flux model with dreambooth? I think I get mess up with the finetuning, we are making a new model, but with dream booth its much more accurate and higher quality then using a lora model training. Dreambooth it will create a new model we do not need an preexisting training ,correct?

Brandon


Related Creators