Skip to content

About LoRA Lens v1.6: Multiply your AI's intelligence by compressing LoRAs by up to 94% to load more specialized knowledge into your VRAM simultaneously. Introducing .loradb database format specifically for LoRAs for further reduction.

License

Notifications You must be signed in to change notification settings

intuitivation/LoRA-Lens

Repository files navigation

LoRA Lens

🧠 LoRA Lens

The Intelligence Multiplier

Compress LoRAs by 65‑94%. Load 10‑20Γ— more. Unlock exponential knowledge combinations.

License: MIT Python 3.8+ Version 1.6 GitHub Stars

πŸš€ Quick Start β€’ πŸ’Ό Pro $49 β€’ 🏒 Studio $149 β€’ πŸ“– Full Docs


The Problem

LoRA files are 144–487 MB each. You can load maybe 2–3 at a time before your VRAM is gone. That means your model is only accessing a fraction of the specialized knowledge available to it.

LoRA Lens fixes this. Compress your LoRAs by 65–94%, load 10–20 simultaneously on the same hardware, and unlock exponentially more knowledge combinations:

 3 LoRAs loaded  β†’       7 combinations
10 LoRAs loaded  β†’   1,023 combinations
15 LoRAs loaded  β†’  32,767 combinations

Same GPU. Same model. Thousands of times more capability.


Benchmarks

Tested on real, publicly available LoRAs. Verify these yourself β€” download links below.

Compression by Format

Format Original After Rank Opt After Quantization Total Reduction
SD 1.5 144 MB 18 MB 9 MB 93.8%
SDXL 144 MB 16 MB 8 MB 94.4%
FLUX 487 MB 175 MB 87 MB 82.1%

Quality Retention

Metric SD 1.5 SDXL FLUX
Variance Retained 99.2% 99.4% 99.1%
SNR 48.2 dB 51.7 dB 46.8 dB
MSE 0.0012 0.0008 0.0015

10-LoRA Verification Test

LoRA Original Compressed Reduction
flux_koda_style 342.0 MB 1.4 MB 99.6%
flux_anime_style 42.8 MB 1.9 MB 95.6%
dmd2_sdxl_4step 750.9 MB 154.3 MB 79.4%
hypersd_sdxl_2step 750.9 MB 186.0 MB 75.2%
hypersd_sdxl_1step 750.9 MB 193.9 MB 74.2%
hypersd_sdxl_8step 750.9 MB 239.6 MB 68.1%
hypersd_sdxl_4step 750.9 MB 245.4 MB 67.3%
lcm_lora_sd15 128.4 MB 71.0 MB 44.7%
hypersd_sd15_4step 256.7 MB 142.8 MB 44.4%
hypersd_sd15_8step 256.7 MB 143.1 MB 44.3%
TOTAL 4,780.9 MB 1,379.3 MB 71.2%

All 10 extract with max weight difference < 0.001. Full database as .loradb: 727.9 MB (47% additional reduction).

πŸ”— Download source LoRAs to verify

How It Works

Stage 1 β€” SVD Rank Optimization

Singular Value Decomposition identifies and removes unused dimensions in each layer's weight matrices. Most LoRAs are trained at higher ranks than they need β€” LoRA Lens finds the optimal rank automatically.

β†’ 30–90% reduction depending on format. Quality retention: 99%+.

Stage 2 β€” 8-Bit Quantization (Pro/Studio)

Converts BFloat16/Float16 weights to Int8 with per-tensor symmetric scale factors. Designed specifically for visual model LoRAs, not adapted from LLM quantization.

β†’ Additional 50% reduction on top of Stage 1.

Stage 3 β€” .loradb Collections

A new single-file format that stores collections of LoRAs using differential compression β€” only the weight deltas between LoRAs are stored. Related LoRAs (character variants, style series) compress dramatically:

Traditional:                          .loradb:
β”œβ”€ character_1.safetensors  144 MB    β”œβ”€ Base (compressed)     20 MB
β”œβ”€ character_2.safetensors  144 MB    β”œβ”€ Diff 1 (delta only)    2 MB
β”œβ”€ character_3.safetensors  144 MB    β”œβ”€ Diff 2 (delta only)    3 MB
└─ Total: 432 MB                      └─ Total: 25 MB  (94% smaller)
Collection Individual As .loradb Reduction
50 character LoRAs 7.2 GB 380 MB 94.7%
100 style LoRAs 14.4 GB 890 MB 93.8%
20 lighting LoRAs 2.88 GB 145 MB 95.0%

Reconstruct any individual LoRA on-demand in milliseconds. Compatible with ComfyUI, A1111, and all standard tools after extraction.

πŸ“ .loradb format specification
.loradb File Structure:
β”œβ”€ Header (magic bytes: 'LORA', version, count, metadata length)
β”œβ”€ Metadata (JSON: collection info, LoRA manifest, offsets)
β”œβ”€ Base LoRA (first LoRA, fully compressed)
β”œβ”€ Differential LoRA #2 (weight deltas from base, sparse format)
β”œβ”€ Differential LoRA #3 (weight deltas from base)
└─ ...

Reconstruction: base + diff_N = original LoRA_N

πŸš€ Quick Start

git clone https://github.com/intuitivation/LoRA-Lens.git
cd LoRA-Lens
pip install -r requirements.txt
python run_lens.py

Opens automatically at http://localhost:8501. Windows users: just run launch_lens.bat.

Requirements: Python 3.8+ Β· 8 GB RAM (16 GB recommended) Β· Works on CPU, faster with GPU

Try it now: The repo includes demo_collection.loradb β€” a mini database with 2 FLUX LoRAs (3.3 MB) you can extract and inspect immediately.

See QUICKSTART.md for a full walkthrough with screenshots.


What's Inside

Tab What It Does
Dashboard Real-time LoRA analysis β€” health score, efficiency metrics, format auto-detection
Analytics Layer-by-layer weight distributions, correlation heatmaps, sparsity visualization
3D Topology UMAP projection of weight patterns with interactive cluster exploration
Conflict Scanner Test two LoRAs for layer conflicts before merging β€” get ratio recommendations
AI Consultant Ask questions about your LoRA in plain English, get optimization advice
Optimize One-click SVD rank optimization with batch processing support
Surgery (Pro) 8-bit/4-bit quantization, Ultra Compress mode, real-time quality metrics
Export Download optimized LoRAs, create and extract .loradb collections

Free vs Pro vs Studio

πŸ†“ Free πŸ’Ό Pro Β· $49 🏒 Studio Β· $149
SVD rank optimization βœ… βœ… βœ…
All formats (SD 1.5 / SDXL / FLUX) βœ… βœ… βœ…
Analysis, visualizations, AI consultant βœ… βœ… βœ…
Conflict detection & batch processing βœ… βœ… βœ…
8-bit / 4-bit quantization β€” βœ… βœ…
Ultra Compress (rank + quant combined) β€” βœ… βœ…
Real-time quality metrics (SNR, MSE, MAE) β€” βœ… βœ…
.loradb creation Up to 5 Up to 50 Unlimited
.loradb extraction βœ… Unlimited βœ… Unlimited βœ… Unlimited
Commercial use β€” βœ… βœ…
Sell/distribute .loradb files β€” β€” βœ…
Users per license 1 1–10 1–25
Priority email support β€” 48hr 24hr

One-time payment. Lifetime updates. No subscription.

Download FreeΒ  Buy ProΒ  Buy Studio


Roadmap

Version What's Coming
v1.7 Batch .loradb creation Β· marketplace integration Β· collection management UI
v2.0 REST API + Python SDK Β· cloud processing Β· collaborative collections
Future Automatic LoRA categorization Β· version control Β· direct tool integrations

Have a feature idea? Open an issue.


Support & Contributing

Bugs & feature requests: GitHub Issues Pro/Studio priority support: jonwright.24@gmail.com

Contributions welcome β€” bug fixes, documentation, feature suggestions. Open an issue to discuss before submitting major changes.


License

MIT for personal and educational use. Commercial license required for business use. Studio license required to sell .loradb files. Full terms in LICENSE and COMMERCIAL_LICENSE.md.


Support Development

LoRA Lens is built and maintained by Jon Wright. If this tool helps your workflow:

⭐ Star this repo β€” helps others find it β˜• Buy me a coffee β€” support development πŸ’Ό Buy a license β€” funds continued development πŸ“£ Share your results β€” post compression wins on Reddit, CivitAI, X


LoRA Lens v1.6 · Made with ❀️ for the AI community, Zoey, and Robl ✨ ·

About

About LoRA Lens v1.6: Multiply your AI's intelligence by compressing LoRAs by up to 94% to load more specialized knowledge into your VRAM simultaneously. Introducing .loradb database format specifically for LoRAs for further reduction.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published