yagmurakarken commited on
Commit
c70ad45
·
verified ·
1 Parent(s): ff2e365

Update model card: paper/arXiv links, how-it-works, results, usage, license

Browse files
Files changed (1) hide show
  1. README.md +100 -22
README.md CHANGED
@@ -1,43 +1,86 @@
1
  ---
 
2
  library_name: pytorch
 
3
  base_model: black-forest-labs/FLUX.1-dev
4
  tags:
5
  - diffusion
 
6
  - flux
7
  - dinov3
8
  - dense-prediction
9
  - semantic-segmentation
10
  - salient-object-detection
11
  - depth-estimation
 
12
  ---
13
 
14
  # MMDiff: Extending Diffusion Transformers for Multi-Modal Generation
15
 
16
- Trained decoder checkpoints for **MMDiff**, which decodes dense perceptual modalities
17
- (semantic segmentation, salient object detection, monocular depth) from a **frozen**
18
- FLUX.1-dev diffusion transformer. Features are fused across multiple denoising
19
- timesteps (with optional DINOv3 features) and only lightweight decoder heads are
20
- trained. The same frozen model can also generate images **and** their annotations
21
- in one pipeline for synthetic data generation.
22
 
23
- - **Code:** https://github.com/yagmurakarken/mmdiff
24
- - **Backbone:** [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) (frozen) + [DINOv3 ViT-B/16](https://huggingface.co/facebook/dinov3-vitb16-pretrain-lvd1689m) (frozen)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ## Checkpoints
27
 
28
- | File | Task | Dataset |
29
- |------|------|---------|
30
- | `duts_saliency.ckpt` | Salient object detection | DUTS |
31
- | `pascal_segmentation.ckpt` | Semantic segmentation | Pascal VOC 2012 |
32
- | `nyu_depth.ckpt` | Monocular depth | NYU Depth V2 |
 
 
33
 
34
- Each checkpoint is a PyTorch Lightning checkpoint that retains the EMA / training
35
- state for reproducibility. Inference loads only the model weights (`state_dict`).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  ## Usage
38
 
39
- Clone the [code repo](https://github.com/yagmurakarken/mmdiff), then download a
40
- checkpoint and run inference:
41
 
42
  ```python
43
  from huggingface_hub import hf_hub_download
@@ -51,15 +94,50 @@ python scripts/inference.py --task pascal \
51
  --image my_image.jpg --output_dir outputs/
52
  ```
53
 
 
 
54
  > Architecture flags (`--hidden_dim`, `--num_transformer_layers`, `--num_timesteps`,
55
- > `--dino_model`) must match the checkpoint.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  ## Citation
58
 
59
  ```bibtex
60
- @inproceedings{akarken2026mmdiff,
61
- title = {{MMDiff}: Extending Diffusion Transformers for Multi-Modal Generation},
62
- author = {Akarken, Yagmur and Kupyn, Orest and Rupprecht, Christian},
63
- year = {2026}
 
64
  }
65
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
  library_name: pytorch
4
+ pipeline_tag: image-segmentation
5
  base_model: black-forest-labs/FLUX.1-dev
6
  tags:
7
  - diffusion
8
+ - diffusion-transformer
9
  - flux
10
  - dinov3
11
  - dense-prediction
12
  - semantic-segmentation
13
  - salient-object-detection
14
  - depth-estimation
15
+ - synthetic-data
16
  ---
17
 
18
  # MMDiff: Extending Diffusion Transformers for Multi-Modal Generation
19
 
20
+ *Yagmur Akarken, Orest Kupyn, Christian Rupprecht Visual Geometry Group, University of Oxford*
 
 
 
 
 
21
 
22
+ [![arXiv](https://img.shields.io/badge/arXiv-2606.16673-b31b1b.svg)](https://arxiv.org/abs/2606.16673)
23
+  [**Paper**](https://arxiv.org/abs/2606.16673) · [**Code**](https://github.com/yagmurakarken/mmdiff) · [**Project page**](https://yagmurakarken.github.io/mmdiff/)
24
+
25
+ **MMDiff** turns a **frozen** diffusion transformer into a multi-modal generator. To create an
26
+ image, a diffusion model must build up the semantic and geometric structure of the scene — and
27
+ normally discards it once the image is rendered. MMDiff keeps that structure and decodes it into
28
+ aligned dense outputs (semantic segmentation, salient object detection, monocular depth) in the
29
+ same generation pass. Because the maps come straight from the generator, one frozen model can
30
+ produce an image **and** its annotations together, enabling synthetic data generation at scale.
31
+
32
+ This repository hosts the trained **decoder-head checkpoints**. The FLUX.1-dev backbone and the
33
+ optional DINOv3 encoder are never fine-tuned — only lightweight heads (~36M parameters) are trained.
34
+
35
+ - **Backbone:** [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) (frozen) + optional [DINOv3 ViT-B/16](https://huggingface.co/facebook/dinov3-vitb16-pretrain-lvd1689m) (frozen)
36
+ - **Trained parameters:** ~36M (decoder heads + feature-fusion module only)
37
+
38
+ ## How it works
39
+
40
+ 1. **Multi-timestep feature fusion.** A small learned module reads FLUX features from several
41
+ denoising steps and fuses them with spatially varying aggregation weights. Perceptual
42
+ information is temporally distributed along the trajectory, so this is the largest contributor —
43
+ up to **+28.7% mIoU** over single-timestep extraction.
44
+ 2. **Concept-driven attention.** The frozen model provides interpretable spatial guidance
45
+ (e.g. object vs. background, near vs. far) as extra cues for each task.
46
+ 3. **Per-task decoder.** A standard lightweight decoder is trained per task (DeepLabV3+ for
47
+ segmentation/saliency, DPT for depth). The generator is never trained.
48
+ 4. **Complementary to encoders.** Frozen FLUX features are competitive with — and complementary
49
+ to — state-of-the-art encoders such as DINOv3; combining them improves every task.
50
 
51
  ## Checkpoints
52
 
53
+ | File | Task | Dataset | Config (in code repo) |
54
+ |------|------|---------|------------------------|
55
+ | `pascal_segmentation.ckpt` | Semantic segmentation | Pascal VOC 2012 | `configs/pascal_voc_config.yaml` |
56
+ | `duts_saliency.ckpt` | Salient object detection | DUTS | `configs/duts_config.yaml` |
57
+ | `nyu_depth.ckpt` | Monocular depth | NYU Depth V2 | `configs/nyu_depth_config.yaml` |
58
+
59
+ Each file is a PyTorch Lightning checkpoint; inference loads only the model weights (`state_dict`).
60
 
61
+ ## Results
62
+
63
+ **Feature quality** (frozen backbone, lightweight heads). Higher is better unless marked ↓.
64
+
65
+ | Variant | VOC mIoU ↑ | DUTS Sₘ ↑ | DUTS MAE ↓ | NYU AbsRel ↓ | NYU RMSE ↓ |
66
+ |---------|-----------|-----------|------------|--------------|------------|
67
+ | MMDiff | 78.9 | 0.918 | 0.020 | 0.1175 | 0.370 |
68
+ | MMDiff + DINOv3 | 84.95 | 0.934 | 0.018 | 0.1164 | 0.365 |
69
+
70
+ **Synthetic-data training** (decoders trained on MMDiff-generated images + labels).
71
+
72
+ | Setting | VOC mIoU ↑ | DUTS Sₘ ↑ | NYU AbsRel ↓ |
73
+ |---------|-----------|-----------|--------------|
74
+ | Synthetic only | 78.9 | 0.784 | 0.1880 |
75
+ | Synthetic + real fine-tune | 87.8 | 0.863 | 0.1185 |
76
+
77
+ Trained purely on synthetic data, MMDiff outperforms prior synthetic-data methods (DatasetDM,
78
+ DiffuMask, Dataset Diffusion). See the [paper](https://arxiv.org/abs/2606.16673) for full tables.
79
 
80
  ## Usage
81
 
82
+ Clone the [code repository](https://github.com/yagmurakarken/mmdiff), then download a checkpoint
83
+ and run inference:
84
 
85
  ```python
86
  from huggingface_hub import hf_hub_download
 
94
  --image my_image.jpg --output_dir outputs/
95
  ```
96
 
97
+ Swap `pascal` → `duts` / `nyu` (with the matching config and checkpoint) for the other tasks.
98
+
99
  > Architecture flags (`--hidden_dim`, `--num_transformer_layers`, `--num_timesteps`,
100
+ > `--dino_model`) must match the checkpoint you load.
101
+
102
+ You can also generate an image and its aligned annotation together with the same frozen backbone:
103
+
104
+ ```bash
105
+ python scripts/generate.py --task pascal \
106
+ --config configs/pascal_voc_config.yaml --checkpoint "$ckpt" \
107
+ --prompts_file prompts.txt --output_dir synth/
108
+ ```
109
+
110
+ ## Intended uses & limitations
111
+
112
+ - **Intended use:** dense prediction (segmentation, saliency, depth) from generated or real images,
113
+ and large-scale synthetic dataset generation with aligned labels for research.
114
+ - **Requires FLUX.1-dev.** These are decoder heads only — you need access to the (gated)
115
+ [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) backbone to run them.
116
+ - **Not a plug-and-play `transformers`/`diffusers` pipeline.** Use the code repository to load and
117
+ run the checkpoints.
118
+ - Performance reflects the training datasets above and may not transfer to very different domains.
119
 
120
  ## Citation
121
 
122
  ```bibtex
123
+ @article{akarken2026mmdiff,
124
+ title = {{MMDiff}: Extending Diffusion Transformers for Multi-Modal Generation},
125
+ author = {Akarken, Yagmur and Kupyn, Orest and Rupprecht, Christian},
126
+ journal = {arXiv preprint arXiv:2606.16673},
127
+ year = {2026}
128
  }
129
  ```
130
+
131
+ ## License
132
+
133
+ The decoder checkpoints and code in this project are released under the **MIT License**. Note that
134
+ the frozen **FLUX.1-dev** backbone they depend on is governed by the
135
+ [FLUX.1-dev Non-Commercial License](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md),
136
+ and **DINOv3** by its own license — review those before any non-research use.
137
+
138
+ ## Acknowledgements
139
+
140
+ Built on [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev),
141
+ [DINOv3](https://github.com/facebookresearch/dinov3),
142
+ [diffusers](https://github.com/huggingface/diffusers), and
143
+ [PyTorch Lightning](https://github.com/Lightning-AI/pytorch-lightning).