What is this?
This is a vibecoded python tool that takes 2 different Krea2 BF16 checkpoints, and SVD compresses their difference to a Lora of chosen rank. The point of this is to compress a 10 to 25 GB checkpoint in a < 0.5 BG Lora. This saves disk space and gives the user the possibility to apply a Lora weight at inference time.
Are Loras just as good as checkpoints?
Maybe they are, maybe they aren't, I'll let you decide. Here are a few facts:
Most checkpoints on Civitai are Lora merges.
With proper rank, and ignoring numerical issues (precision, conditionning), the method implemented in the script is designed to retrieve a (low rank) Lora exactly.
Here is what I found out in my tests (Lora weight 1 vs full checkpoint, same seed):
The output images are very clearly not the same, with about as much variance as a usual seed-to-seed variance
I was not able to tell the apart reliably in a blind test
Here is my opinion: virtually all checkpoints available on Civitai, especially those created by those who publish A LOT of checkpoints, and those who paywall their models (via Patreon, Ko-fi, etc ...) would benefit in being distributed as a Lora instead of a checkpoint. I encourage anyone who to use this tool to build their own opinion, based on personal experience.
What makes the script good?
During execution, the script only uses < 3GB Vram, making it suitable for any graphics card that can generate images with Krea2.
What makes the script bad?
The script is a public domain very low effort vibocoded piece of ****, provided with no guarantees at all. Please do not use if you don't know what you are doing.
How can I run it?
It was only tested on one machine running Windows, and probably only works on Windows.
Download the zip file, edit the configuration section of run_krea2_lora.py file, pip install a few packages and enjoy.
Description
v1.0
