Text-to-Image
Diffusers
Safetensors
flux
model-compression
structured-pruning
knowledge-distillation
Instructions to use TDSXn9hai/exflux with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use TDSXn9hai/exflux with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("TDSXn9hai/exflux", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Add model card for selected Stage 2 v2 checkpoints
Browse files
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: flux-non-commercial-license
|
| 4 |
+
library_name: diffusers
|
| 5 |
+
tags:
|
| 6 |
+
- flux
|
| 7 |
+
- text-to-image
|
| 8 |
+
- model-compression
|
| 9 |
+
- structured-pruning
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# EC-FLUX Stage 2 v2
|
| 13 |
+
|
| 14 |
+
Structured-pruned FLUX.2 Klein 4B Base DiT checkpoints from the
|
| 15 |
+
[EC-FLUX GitHub repository](https://github.com/TDSXn9hai/ecflux).
|
| 16 |
+
|
| 17 |
+
Only three selected checkpoints are published:
|
| 18 |
+
|
| 19 |
+
| Directory | DiT parameters | Parameter ratio | Removed Single Blocks |
|
| 20 |
+
|---|---:|---:|---|
|
| 21 |
+
| `full` | 2.891B | 0.746 | 6, 8, 10, 13 |
|
| 22 |
+
| `fixed_ratio` | 3.227B | 0.833 | 6, 8, 10, 13 |
|
| 23 |
+
| `no_block` | 3.340B | 0.862 | none |
|
| 24 |
+
|
| 25 |
+
Each directory contains:
|
| 26 |
+
|
| 27 |
+
- `model.safetensors`: pruned DiT weights.
|
| 28 |
+
- `prune_spec.json`: original unit indices and reconstruction metadata.
|
| 29 |
+
- `history.json`: APRA rounds, gates, recovery steps, and final metrics.
|
| 30 |
+
- `run_config.json`: experiment configuration.
|
| 31 |
+
- `eval_summary.json` and `eff_summary.json`: D_val evaluation and 512px
|
| 32 |
+
efficiency measurements.
|
| 33 |
+
|
| 34 |
+
Use the original FLUX.2 Klein 4B pipeline for the text encoder, tokenizer, VAE,
|
| 35 |
+
and scheduler, replacing its transformer with one of these pruned DiT
|
| 36 |
+
checkpoints. The repository supports loading via `ecflux.flux_utils.load_transformer`.
|
| 37 |
+
|
| 38 |
+
The checkpoints inherit the FLUX.2 Klein non-commercial license and acceptable
|
| 39 |
+
use policy. See the upstream model:
|
| 40 |
+
<https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4B>.
|
| 41 |
+
|
| 42 |
+
## Source results
|
| 43 |
+
|
| 44 |
+
- [Stage 2 v2 report](https://github.com/TDSXn9hai/ecflux/blob/main/outputs/stage2_v2/RESULTS.md)
|
| 45 |
+
- [Summary table](https://github.com/TDSXn9hai/ecflux/blob/main/outputs/stage2_v2/summary.md)
|
| 46 |
+
- [Comparison samples](https://github.com/TDSXn9hai/ecflux/blob/main/outputs/stage2_v2/samples/compare.jpg)
|