geo_prior v1: 1 epoch imagenet-synthetic-schnell-10k, shift=2.5
Browse files- README.md +72 -3
- geo_prior.safetensors +3 -0
- simplex_config.json +16 -0
README.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
| 1 |
-
---
|
| 2 |
-
license:
|
| 3 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: sd15-flow-trainer
|
| 4 |
+
tags:
|
| 5 |
+
- geometric-deep-learning
|
| 6 |
+
- stable-diffusion
|
| 7 |
+
- ksimplex
|
| 8 |
+
- pentachoron
|
| 9 |
+
- flow-matching
|
| 10 |
+
- cross-attention-prior
|
| 11 |
+
base_model: sd-legacy/stable-diffusion-v1-5
|
| 12 |
+
pipeline_tag: text-to-image
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# KSimplex Geometric Attention Prior
|
| 16 |
+
|
| 17 |
+
Geometric cross-attention prior for SD1.5 using pentachoron (4-simplex) structures.
|
| 18 |
+
|
| 19 |
+
## Architecture
|
| 20 |
+
|
| 21 |
+
| Component | Params |
|
| 22 |
+
|-----------|--------|
|
| 23 |
+
| SD1.5 UNet (frozen) | 859,520,964 |
|
| 24 |
+
| **Geo prior (trained)** | **4,845,725** |
|
| 25 |
+
|
| 26 |
+
The geometric prior modulates CLIP encoder hidden states through
|
| 27 |
+
4-layer stacked k-simplex attention before they reach
|
| 28 |
+
the 16 cross-attention blocks in the UNet.
|
| 29 |
+
|
| 30 |
+
## Simplex Configuration
|
| 31 |
+
|
| 32 |
+
| Parameter | Value |
|
| 33 |
+
|-----------|-------|
|
| 34 |
+
| k (simplex dim) | 4 |
|
| 35 |
+
| Embedding dim | 32 |
|
| 36 |
+
| Feature dim | 768 |
|
| 37 |
+
| Stacked layers | 4 |
|
| 38 |
+
| Attention heads | 8 |
|
| 39 |
+
| Base deformation | 0.25 |
|
| 40 |
+
| Residual blend | learnable |
|
| 41 |
+
| Timestep conditioned | True |
|
| 42 |
+
|
| 43 |
+
## Usage
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
from sd15_trainer_geo.pipeline import load_pipeline, load_geo_from_hub
|
| 47 |
+
|
| 48 |
+
# Load base SD1.5 + fresh geo prior
|
| 49 |
+
pipe = load_pipeline()
|
| 50 |
+
|
| 51 |
+
# Load trained geo weights from this repo
|
| 52 |
+
load_geo_from_hub(pipe, "AbstractPhil/sd15-rectified-geometric-matching")
|
| 53 |
+
|
| 54 |
+
# Or one-shot: load base + geo in one call
|
| 55 |
+
pipe = load_pipeline(geo_repo_id="AbstractPhil/sd15-rectified-geometric-matching")
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
## Training Info
|
| 59 |
+
|
| 60 |
+
- **dataset**: AbstractPhil/imagenet-synthetic (flux_schnell_512)
|
| 61 |
+
- **samples**: 10000
|
| 62 |
+
- **epochs**: 1
|
| 63 |
+
- **shift**: 2.5
|
| 64 |
+
- **base_lr**: 0.0001
|
| 65 |
+
- **min_snr_gamma**: 5.0
|
| 66 |
+
- **cfg_dropout**: 0.1
|
| 67 |
+
- **batch_size**: 6
|
| 68 |
+
- **loss_final**: 0.3784324672818184
|
| 69 |
+
|
| 70 |
+
## License
|
| 71 |
+
|
| 72 |
+
MIT — [AbstractPhil](https://huggingface.co/AbstractPhil)
|
geo_prior.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:103aa7f7b25704f22736673cc706573cd97f4e0fef48063560149d278c361f79
|
| 3 |
+
size 19391076
|
simplex_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"k": 4,
|
| 3 |
+
"edim": 32,
|
| 4 |
+
"feat_dim": 768,
|
| 5 |
+
"num_layers": 4,
|
| 6 |
+
"base_deformation": 0.25,
|
| 7 |
+
"learnable_deformation": true,
|
| 8 |
+
"timestep_conditioned": true,
|
| 9 |
+
"num_heads": 8,
|
| 10 |
+
"dropout": 0.0,
|
| 11 |
+
"cm_loss_weight": 0.01,
|
| 12 |
+
"vol_consistency_weight": 0.005,
|
| 13 |
+
"residual_blend": "learnable",
|
| 14 |
+
"initial_blend": 0.0,
|
| 15 |
+
"_base_repo": "sd-legacy/stable-diffusion-v1-5"
|
| 16 |
+
}
|