Skip to content

Commit a837ca1

Browse files
committed
more clean ups
1 parent 4c2b1f6 commit a837ca1

9 files changed

Lines changed: 3741 additions & 3637 deletions

File tree

README.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -701,36 +701,10 @@ We added ring attention support for Wan models. Below are the stats for one `720
701701
> * For 9B: `flux_name="flux2-klein-9b" pretrained_model_name_or_path="black-forest-labs/FLUX.2-klein-9B"`
702702
703703
**Interactive Mode (Instant Subsequent Generation):**
704-
To avoid JIT re-compilation latency when testing multiple prompts, enable `interactive=True`. The model weights remain loaded in TPU memory, and after the initial warmup pass, each new prompt generates in **~0.9s**:
704+
To avoid JIT re-compilation latency when testing multiple prompts, enable `interactive=True`. The model weights remain loaded in TPU memory, and after the initial warmup pass, each new prompt generates in **<1s**:
705705
```bash
706706
python src/maxdiffusion/generate_flux2klein.py src/maxdiffusion/configs/base_flux2klein.yml interactive=True
707707
```
708-
709-
### 2. Running Tests & Verification
710-
711-
MaxDiffusion includes a full suite of unit, parity, and end-to-end smoke tests for Flux.2-klein:
712-
713-
* **Modular Component Unit Tests (Self-Contained Dummy Weights)**:
714-
Verifies SwiGLU MLP, Attention, FlowMatch Scheduler, Double/Single Transformer Blocks, and VAE Decoder:
715-
```bash
716-
pytest src/maxdiffusion/tests/flux2klein/generate_flux2klein_test.py -s -vv
717-
```
718-
719-
* **End-to-End Smoke Test Suite (1024x1024 Reference Image Parity)**:
720-
Runs full 4B and 9B text-to-image pipelines and asserts `SSIM >= 0.90` against TPU-generated reference images:
721-
```bash
722-
pytest src/maxdiffusion/tests/generate_flux2klein_smoke_test.py -s -vv
723-
```
724-
725-
* **PyTorch vs JAX 4B End-to-End Parity Test**:
726-
```bash
727-
pytest src/maxdiffusion/tests/flux2klein/test_4b_e2e_parity.py -s -vv
728-
```
729-
730-
* **PyTorch vs JAX 9B End-to-End Parity Test**:
731-
```bash
732-
pytest src/maxdiffusion/tests/flux2klein/test_9b_e2e_parity.py -s -vv
733-
```
734708
## Fused Attention for GPU:
735709
Fused Attention for GPU is supported via TransformerEngine. Installation instructions:
736710

0 commit comments

Comments
 (0)