Repository navigation
loraspectra: Zero-dependency Rust CLI to shrink, audit, extract, and orthogonally merge ComfyUI LoRA/DoRA .safetensors #17710
SalyyS1
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
If you use multiple LoRAs in ComfyUI (Flux.1/Flux.2, SDXL, Wan, Qwen-Image, LTX-Video) or extract LoRAs from finetuned checkpoints (like SRPO), we built a zero-dependency Rust CLI tool called loraspectra that works directly on
.safetensorsfiles on CPU in milliseconds.What you can do with
loraspectraortho-svd):When you stack a character LoRA + a style LoRA + a lighting LoRA in ComfyUI, overlapping attention directions often fight each other and wash out details.
loraspectraprojects conflicting singular vectors onto the orthogonal complement before SVD re-compression:compress):Uses exact Eckart-Young SVD (
--energy 0.99) or Marchenko-Pastur noise removal (--policy mp) and supports--bake-alpha+--format kohyaso ComfyUI loads the resized adapter with exact per-layer scaling.extract):Automatically matches ComfyUI
model.diffusion_model.keys against Kohya/Diffusers checkpoints when extracting a LoRA fromW_tuned - W_base..safetensorsLoRAs (audit):Reverse-engineers the base model family (Flux.1, Flux.2, SDXL, SD1.5, VLM), rank distribution, DoRA scales, and flags dead/untrained layers (
DEAD_LAYER).Repo & Linux binary release: https://github.com/SalyyS1/loraspectra (or
cargo install --git https://github.com/SalyyS1/loraspectra.git).If you find this useful for your ComfyUI LoRA collection, a star on SalyyS1/loraspectra is much appreciated!
All reactions