LumaFlux v2 adapters: main (mixed corpus) and HDRTV1K in-domain
Browse files- README.md +143 -0
- configs/hdrtv1k.yaml +39 -0
- configs/main.yaml +46 -0
- lumaflux-hdrtv1k.safetensors +3 -0
- lumaflux-main.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: flux-1-dev-non-commercial-license
|
| 4 |
+
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
| 5 |
+
base_model: black-forest-labs/FLUX.1-dev
|
| 6 |
+
tags:
|
| 7 |
+
- inverse-tone-mapping
|
| 8 |
+
- hdr
|
| 9 |
+
- sdr-to-hdr
|
| 10 |
+
- diffusion
|
| 11 |
+
- flux
|
| 12 |
+
- video
|
| 13 |
+
- image-to-image
|
| 14 |
+
pipeline_tag: image-to-image
|
| 15 |
+
library_name: safetensors
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# LumaFlux: Lifting 8-Bit Worlds to HDR Reality with Physically-Guided Diffusion Transformers
|
| 19 |
+
|
| 20 |
+
[Paper (arXiv:2604.02787)](https://arxiv.org/abs/2604.02787) ·
|
| 21 |
+
[Code (GitHub)](https://github.com/shreshthsaini/LumaFlux) ·
|
| 22 |
+
[Project page](https://shreshthsaini.github.io/LumaFlux/)
|
| 23 |
+
|
| 24 |
+
Shreshth Saini, Hakan Gedik, Neil Birkbeck, Yilin Wang, Balu Adsumilli, Alan C. Bovik
|
| 25 |
+
— The University of Texas at Austin and Google, Inc.
|
| 26 |
+
|
| 27 |
+
LumaFlux converts 8-bit SDR (BT.709) images and video into 10-bit HDR
|
| 28 |
+
(PQ, BT.2020) by adapting a **frozen** FLUX.1-dev MM-DiT. This repository holds
|
| 29 |
+
the trained **adapter weights only**: 71,315,893 parameters, 0.57% of the
|
| 30 |
+
backbone. The frozen FLUX.1-dev backbone and SigLIP encoder are downloaded
|
| 31 |
+
separately at load time.
|
| 32 |
+
|
| 33 |
+
Conversion is prompt-free. Inference integrates a rectified-flow bridge from the
|
| 34 |
+
SDR latent in 8 steps, and video is handled by the same image model with no
|
| 35 |
+
temporal layers, optical flow, or video fine-tuning.
|
| 36 |
+
|
| 37 |
+
## Checkpoints
|
| 38 |
+
|
| 39 |
+
| File | Training corpus | Steps | Intended use |
|
| 40 |
+
|---|---|---|---|
|
| 41 |
+
| `lumaflux-main.safetensors` | Mixed UGC + PGC (314,396 pairs from 2,092 videos) | 100,000 | **Default.** General SDR-to-HDR conversion, video, and the Luma-Eval benchmark. |
|
| 42 |
+
| `lumaflux-hdrtv1k.safetensors` | HDRTV1K training split | 50,000 | In-domain HDRTV1K comparisons and compression-robustness studies. |
|
| 43 |
+
|
| 44 |
+
Both files carry the identical architecture and are interchangeable at load
|
| 45 |
+
time; they differ only in training data and schedule.
|
| 46 |
+
|
| 47 |
+
## Results
|
| 48 |
+
|
| 49 |
+
**Luma-Eval** (our common run-by-us protocol; 100 held-out frames, synthetic
|
| 50 |
+
tone-mapping and codec degradations). `lumaflux-main`:
|
| 51 |
+
|
| 52 |
+
| Method | PU21-PSNR ↑ | PU21-SSIM ↑ | ΔE_ITP ↓ | HDR-VDP-3 ↑ | FR-HIDRO ↓ |
|
| 53 |
+
|---|---:|---:|---:|---:|---:|
|
| 54 |
+
| BT.2446c inverse | 23.74 | 0.8291 | 61.60 | 5.611 | 0.753 |
|
| 55 |
+
| HDRTVNet++ | 23.03 | 0.8192 | 66.67 | 5.417 | 0.703 |
|
| 56 |
+
| FMNet | 22.86 | 0.8176 | 67.92 | 5.412 | 0.724 |
|
| 57 |
+
| **LumaFlux** | **24.23** | **0.8294** | **56.54** | **5.812** | **0.631** |
|
| 58 |
+
|
| 59 |
+
**HDRTV1K** (117 published test pairs, evaluated under the authors' protocol):
|
| 60 |
+
|
| 61 |
+
| Model | PSNR ↑ | SSIM ↑ | SR-SIM ↑ | ΔE_ITP ↓ | HDR-VDP-3 ↑ |
|
| 62 |
+
|---|---:|---:|---:|---:|---:|
|
| 63 |
+
| `lumaflux-hdrtv1k` (in-domain) | 33.34 | 0.9427 | 0.9941 | 14.69 | 7.962 |
|
| 64 |
+
| `lumaflux-main` (zero-shot) | 27.52 | 0.9307 | 0.9837 | 29.86 | 7.618 |
|
| 65 |
+
|
| 66 |
+
The zero-shot row is reported for transparency: the main model never sees the
|
| 67 |
+
HDRTV1K training split, so it is not comparable to methods trained on it.
|
| 68 |
+
|
| 69 |
+
**Video.** Sharing one bridge-noise realization across frames and smoothing the
|
| 70 |
+
applied tone-curve parameters with an EMA reduces signed excess PU21 flicker by
|
| 71 |
+
**53.3%**, with pooled temporal energy within 3.3% of the reference, without any
|
| 72 |
+
temporal training.
|
| 73 |
+
|
| 74 |
+
**Cost.** 8 solver steps, 5.28 s per 1080p frame and 27.1 GB peak memory on a
|
| 75 |
+
single GH200. Forty steps cost 4.7x more without improving quality.
|
| 76 |
+
|
| 77 |
+
## Usage
|
| 78 |
+
|
| 79 |
+
```bash
|
| 80 |
+
pip install "lumaflux @ git+https://github.com/shreshthsaini/LumaFlux.git"
|
| 81 |
+
huggingface-cli download shreshthsaini/LumaFlux lumaflux-main.safetensors --local-dir weights
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
# Image or video in, 10-bit PQ/BT.2020 HDR out
|
| 86 |
+
python -m lumaflux.inference.cli \
|
| 87 |
+
--config configs/model/flux_dev.yaml \
|
| 88 |
+
--adapters weights/lumaflux-main.safetensors \
|
| 89 |
+
--input input_sdr.mp4 --output output_hdr.mp4 --steps 8
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
Loading the adapters also pulls `black-forest-labs/FLUX.1-dev` (gated; accept
|
| 93 |
+
its license first) and `google/siglip-so400m-patch14-384`. Full instructions,
|
| 94 |
+
data preparation, training, and the evaluation suite are in the
|
| 95 |
+
[GitHub repository](https://github.com/shreshthsaini/LumaFlux).
|
| 96 |
+
|
| 97 |
+
## Training
|
| 98 |
+
|
| 99 |
+
Both checkpoints were trained with a frozen backbone: only PGA (gated low-rank
|
| 100 |
+
attention residuals), PCM (SigLIP FiLM conditioning), the HDR Residual Coupler,
|
| 101 |
+
the timestep-layer conditioner, and the monotone RQS tone head receive
|
| 102 |
+
gradients. Optimization used AdamW at learning rate 2e-4, global batch 16, 512px
|
| 103 |
+
crops, bf16, and a rectified-flow velocity objective with decoded-reconstruction
|
| 104 |
+
and spline-smoothness terms. The main model trained for about 36 hours on four
|
| 105 |
+
GH200 GPUs (~144 GPU-hours).
|
| 106 |
+
|
| 107 |
+
Training data combines CHUG user-generated HDR, LIVE-TMHDR (including
|
| 108 |
+
expert-graded SDR), HDRTV1K, and the Netflix Open Content *Sol Levante* HDR10
|
| 109 |
+
master. SDR inputs are either genuine expert grades or generated with a frozen
|
| 110 |
+
degradation chain of eight tone-mapping operators, BT.2020-to-BT.709 gamut
|
| 111 |
+
conversion, and three CRF settings.
|
| 112 |
+
|
| 113 |
+
## License and intended use
|
| 114 |
+
|
| 115 |
+
These adapters only function on top of FLUX.1-dev and are therefore released
|
| 116 |
+
under the **FLUX.1-dev Non-Commercial License**; research use only. The
|
| 117 |
+
accompanying source code is Apache-2.0. Users must separately accept the
|
| 118 |
+
FLUX.1-dev license.
|
| 119 |
+
|
| 120 |
+
Intended for research on inverse tone mapping, archival SDR remastering, and
|
| 121 |
+
HDR video pipelines. Not validated for medical, forensic, or safety-critical
|
| 122 |
+
imaging.
|
| 123 |
+
|
| 124 |
+
## Limitations
|
| 125 |
+
|
| 126 |
+
- The frozen VAE was not trained as an HDR codec, so the tone head calibrates
|
| 127 |
+
its output but cannot recover detail absent from heavily clipped SDR.
|
| 128 |
+
- Temporal stabilization is inference-time only and does not model long-range
|
| 129 |
+
motion explicitly.
|
| 130 |
+
- On the selected qualitative scenes the outputs measure slightly more saturated
|
| 131 |
+
than their references (mean ITP chroma 60.65 versus 49.80).
|
| 132 |
+
- Correct display metadata and EOTF settings are required at playback.
|
| 133 |
+
|
| 134 |
+
## Citation
|
| 135 |
+
|
| 136 |
+
```bibtex
|
| 137 |
+
@article{saini2026lumaflux,
|
| 138 |
+
title = {LumaFlux: Lifting 8-Bit Worlds to HDR Reality with Physically-Guided Diffusion Transformers},
|
| 139 |
+
author = {Saini, Shreshth and Gedik, Hakan and Birkbeck, Neil and Wang, Yilin and Adsumilli, Balu and Bovik, Alan C.},
|
| 140 |
+
journal = {arXiv preprint arXiv:2604.02787},
|
| 141 |
+
year = {2026}
|
| 142 |
+
}
|
| 143 |
+
```
|
configs/hdrtv1k.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
backbone: black-forest-labs/FLUX.1-dev
|
| 3 |
+
siglip: google/siglip-so400m-patch14-384
|
| 4 |
+
dtype: bf16
|
| 5 |
+
gradient_checkpointing: false
|
| 6 |
+
rank: 8
|
| 7 |
+
bottleneck: 64
|
| 8 |
+
num_knots: 8
|
| 9 |
+
phys_channels: 32
|
| 10 |
+
stats_dim: 16
|
| 11 |
+
num_bands: 8
|
| 12 |
+
num_null_tokens: 8
|
| 13 |
+
modulation_hidden: 128
|
| 14 |
+
guidance_scale: 1.0
|
| 15 |
+
peak_nits: 1000.0
|
| 16 |
+
train:
|
| 17 |
+
max_steps: 50000
|
| 18 |
+
batch_size: 2
|
| 19 |
+
grad_accum: 2
|
| 20 |
+
lr: 0.0002
|
| 21 |
+
betas:
|
| 22 |
+
- 0.9
|
| 23 |
+
- 0.999
|
| 24 |
+
weight_decay: 0.01
|
| 25 |
+
warmup_steps: 5000
|
| 26 |
+
crop_size: 512
|
| 27 |
+
bridge_noise: 0.05
|
| 28 |
+
recon_every: 4
|
| 29 |
+
w_velocity: 1.0
|
| 30 |
+
lambda1: 1.0
|
| 31 |
+
lambda2: 0.5
|
| 32 |
+
lambda3: 0.1
|
| 33 |
+
max_grad_norm: 1.0
|
| 34 |
+
mixed_precision: bf16
|
| 35 |
+
num_workers: 4
|
| 36 |
+
log_every: 50
|
| 37 |
+
ckpt_every: 5000
|
| 38 |
+
trackio_project: lumaflux
|
| 39 |
+
seed: 0
|
configs/main.yaml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Full v2 training run. The 4-node launcher gives an effective global batch
|
| 2 |
+
# of 4 nodes x 2 samples x 2 accumulation steps = 16.
|
| 3 |
+
model:
|
| 4 |
+
backbone: black-forest-labs/FLUX.1-dev
|
| 5 |
+
siglip: google/siglip-so400m-patch14-384
|
| 6 |
+
dtype: bf16
|
| 7 |
+
gradient_checkpointing: false
|
| 8 |
+
rank: 8
|
| 9 |
+
bottleneck: 64
|
| 10 |
+
num_knots: 8
|
| 11 |
+
phys_channels: 32
|
| 12 |
+
stats_dim: 16
|
| 13 |
+
num_bands: 8
|
| 14 |
+
num_null_tokens: 8
|
| 15 |
+
modulation_hidden: 128
|
| 16 |
+
guidance_scale: 1.0
|
| 17 |
+
peak_nits: 1000.0
|
| 18 |
+
|
| 19 |
+
data:
|
| 20 |
+
manifest: data/curated/manifest.jsonl # path produced by scripts/prepare_data.py
|
| 21 |
+
|
| 22 |
+
train:
|
| 23 |
+
max_steps: 100000
|
| 24 |
+
batch_size: 2
|
| 25 |
+
grad_accum: 2
|
| 26 |
+
lr: 2.0e-4
|
| 27 |
+
betas: [0.9, 0.999]
|
| 28 |
+
weight_decay: 0.01
|
| 29 |
+
warmup_steps: 5000
|
| 30 |
+
scheduler: cosine
|
| 31 |
+
crop_size: 512
|
| 32 |
+
bridge_noise: 0.05
|
| 33 |
+
recon_every: 4
|
| 34 |
+
w_velocity: 1.0
|
| 35 |
+
lambda1: 1.0
|
| 36 |
+
lambda2: 0.5
|
| 37 |
+
lambda3: 0.1
|
| 38 |
+
max_grad_norm: 1.0
|
| 39 |
+
mixed_precision: bf16
|
| 40 |
+
num_workers: 8
|
| 41 |
+
log_every: 50
|
| 42 |
+
ckpt_every: 5000
|
| 43 |
+
ckpt_keep: 3
|
| 44 |
+
trackio_project: lumaflux
|
| 45 |
+
run_name: lumaflux-main-v2
|
| 46 |
+
seed: 0
|
lumaflux-hdrtv1k.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:758160a9dec71027b3a3f2f33111d70ddc62d72b1c91b57a3fbc04fa57f89b0a
|
| 3 |
+
size 285366796
|
lumaflux-main.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c22693b09d769526fecdd7dd6d0b0bcaae86dbf7d3d8c79d7ae66b7f722282e1
|
| 3 |
+
size 285366796
|