Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,71 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: gpl-3.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gpl-3.0
|
| 3 |
+
tags:
|
| 4 |
+
- lora
|
| 5 |
+
- merge
|
| 6 |
+
- comfyui
|
| 7 |
+
- stable-diffusion
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# LoRA Optimizer — Community Cache
|
| 11 |
+
|
| 12 |
+
Shared analysis results for the [LoRA Optimizer](https://github.com/ethanfel/ComfyUI-LoRA-Optimizer) ComfyUI node.
|
| 13 |
+
|
| 14 |
+
LoRA merge analysis is hardware-agnostic — the same LoRA files always produce the same conflict metrics and optimal merge config regardless of GPU tier. This dataset lets users share and reuse those results so nobody has to run the AutoTuner from scratch.
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
## How It Works
|
| 19 |
+
|
| 20 |
+
The AutoTuner computes pairwise conflict metrics (cosine similarity, sign conflicts, subspace overlap) and tests merge parameter combinations to find the best config for a set of LoRAs. These results are keyed by **content hash** (SHA256[:16] of file contents) — not by filename — so they're portable across systems and private by design.
|
| 21 |
+
|
| 22 |
+
When `community_cache=download_only` or `upload_and_download` is set in the AutoTuner node:
|
| 23 |
+
|
| 24 |
+
- **Download:** Before running analysis, the node checks this dataset for existing results. A config hit skips the entire sweep (~30–120s saved). Lora/pair cache hits speed up the analysis phase even without a full config hit.
|
| 25 |
+
- **Upload:** After a successful sweep, results are uploaded if the local score beats the current community score for that LoRA set.
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## Privacy
|
| 30 |
+
|
| 31 |
+
**LoRA filenames are never stored here.** Only SHA256[:16] content hashes are used as keys. The uploaded data contains:
|
| 32 |
+
- Per-prefix conflict metrics (cosine similarity, sign conflict ratios, subspace overlap)
|
| 33 |
+
- Winning merge configuration (sparsification method, merge strategy, refinement level, etc.)
|
| 34 |
+
- A composite quality score
|
| 35 |
+
|
| 36 |
+
No file paths, no usernames, no LoRA names.
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## File Structure
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
lora/
|
| 44 |
+
{content_hash}.lora.json # Per-LoRA per-prefix conflict stats
|
| 45 |
+
pair/
|
| 46 |
+
{hash_a}_{hash_b}.pair.json # Pairwise conflict metrics (hashes sorted)
|
| 47 |
+
config/
|
| 48 |
+
{hash_a}_{hash_b}_..._{arch}.config.json # Best merge config + score for a LoRA set
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
All files include an `algo_version` field. Results from incompatible algorithm versions are ignored automatically.
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Usage
|
| 56 |
+
|
| 57 |
+
In the **LoRA AutoTuner** node, set `community_cache` to:
|
| 58 |
+
|
| 59 |
+
| Value | Behavior |
|
| 60 |
+
|-------|----------|
|
| 61 |
+
| `disabled` | No network interaction (default) |
|
| 62 |
+
| `download_only` | Download precomputed results anonymously — no account needed |
|
| 63 |
+
| `upload_and_download` | Also contribute your results. Requires `HF_TOKEN` env var with write access and `huggingface_hub` installed (`pip install huggingface_hub`) |
|
| 64 |
+
|
| 65 |
+
Network errors are silently ignored — the node always falls back to local computation.
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## Contributing
|
| 70 |
+
|
| 71 |
+
Run the AutoTuner with `community_cache=upload_and_download`. Your results are uploaded automatically after each sweep if they beat the current community score. No manual steps needed.
|