Patrefans
Furkan Gözükara from patreon
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

🕑 Added 2024-06-19 23:35:00 +0000 UTC
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

Furkan Gözükara

i think almost same quality but fp16 more preferred

Juanmyth

Is it fp16 better than bf16?

Furkan Gözükara

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

Leo

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.

Furkan Gözükara

what is your file size? safetensors_rust.Safetensor

Mojahed Rudainee

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!!

Furkan Gözükara

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

Vadim

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)

Furkan Gözükara

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

Hugo Morosini

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 !

Furkan Gözükara

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

puk

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.

Furkan Gözükara

wow that is huge. the maximum i needed was 1.1

Jonathan Streeter

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...

Furkan Gözükara

we dont know for sure yet

CanE

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

Furkan Gözükara

maybe same style license as dev model

Furkan Gözükara

we are waiting

JamZam WamBam

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

CanE

It wont be Open Source.

Furkan Gözükara

awesome

Pablo Montero

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

Furkan Gözükara

it is almost same as rtx 3090 but half of 4090

Hung Do

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

Furkan Gözükara

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

Member

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

Furkan Gözükara

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

JamZam WamBam

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.

Furkan Gözükara

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

Brandon

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?


More Creators