💦 CREATE AND FUCK YOUR OWN AI CUMSLUT 🔥 TRY NOW ♥
Create AI Cumsluts 💦
December 10, 2024

How to Convert Your Trained FLUX, Stable Diffusion 3.5, SDXL and Other LoRAs Into FP8 and FP16 to Save Huge Space With Kohya GUI

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)

=======

10 December 2024 Update

  • Screenshot updated according to latest version

Details

How To Reduce LoRA Model Files Size

  • There are 3 ways of reducing generated / save LoRA models

  • 1 : When training, you can reduce LoRA Network Rank (Dimension)

    • I don't recommend this since it reduces the quality

  • 2 : Saving as FP16 when training

    • This makes it half but still files will be big, almost no quality loss as shown in below grid

  • 3 : Saving as FP8 after trained as shown in above images via Kohya GUI

    • As shown in below grid almost best quality and 2.5 GB FP32 LoRA file becomes 634 MB

  • Full grid that shows FP8 vs FP16 vs FP32 : LoRA_Precision_FP8_vs_FP16_vs_FP32_Grid.jpg

  • With this way you can convert any model LoRAs like:

    • Stable Diffusion 1.5 (SD 1.5), Stable Diffusion XL (SDXL), Stable Diffusion 3 or Stable Diffusion 3.5 (SD 3.5), FLUX and such

  • However how other architectures like SDXL will perform need to be grid tested

 

 

Comments (8)

E
Emelaine Pilan · February 4, 2025

impossible to convert... always the same permission error, serialize_file(_flatten(tensors), filename, metadata=metadata) safetensors_rust.SafetensorError: Error while serializing: IoError(Os { code: 5, kind: PermissionDenied, message: "Acesso negado." })

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 4, 2025

100% related to your windows setup. i can connect your pc and fix if you upgrade to gold tier. or look for drive permissions on google

s
sebastian · December 14, 2024

Is there a way to batch do all the saved steps along the way?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · December 14, 2024

no atm but i am pretty sure bmaltais can implement can you open request here? : https://github.com/bmaltais/kohya_ss/issues - i can also reply

c
cool1 · November 5, 2024

is says "or stable diffusion 3.5"... is it true that kohya hasn't been updated for training SD3.5 large yet? Is onetrainer the only thing that does (I haven't used ontrainer).

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · November 5, 2024

Kohya got SD 3.5 training hopefully I will research this week

Y
Yassine Belatar · November 4, 2024

Why cpu not gpu isn't cpu slower ? Also How long it takes ?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · November 5, 2024

it is super fast. you can pick gpu too :)