✨ Under Review at NeurIPS 2026 ✨
Bowen Chen1 · Shreshth Saini1 · Balu Adsumilli2 · Alan C. Bovik1
1 The University of Texas at Austin 2 Google
LumaGuide is a training-free framework for distribution shaping in pretrained diffusion models. Instead of touching weights, we steer the sampling trajectory to match a target feature distribution via differentiable, energy-based guidance, and instantiate it for HDR image generation by shaping luminance in perceptually-uniform PQ space.
🚀 Zero-training: no fine-tuning, no LoRAs, only a tiny 32-bin text→histogram regressor (~300K params)
🎯 PQ-domain, VAE-grounded: soft histogram + Wasserstein-1 guidance back-propagated through the Flux VAE
🎛 Three target modes: caption-driven regressor, reference HDR image, or a manual 32-bin histogram
📡 HDR I/O out of the box: writes Radiance .hdr in linear cd/m² + a diagnostic ACES Filmic EV ladder
🧩 Backbone-agnostic in design: Flux.1-dev shipped today; SD3 / SDXL / CogVideoX on the roadmap
- [2026/09/13]
regressor.ptand the test prompts are mirrored on Hugging Face: https://huggingface.co/shreshthsaini/LumaGuide. - [2026/08/06] arXiv preprint is up: https://arxiv.org/abs/2607.26237.
- [2026/05/14] Reference inference code, pretrained text→histogram regressor, and 100-prompt test set released. See Usage below.
- [2026/05/13] Project page is live: https://shreshthsaini.github.io/LumaGuide/.
- [2026/05/13] Paper submitted to NeurIPS 2026.
Tested with CUDA 12.1, PyTorch 2.4, Python 3.10/3.11/3.13 on a single A100 (40 / 80 GB). The script needs ≈ 30 GB VRAM at 512² (the W₁ backward through the VAE adds ≈ 6 GB peak over vanilla Flux inference); 1024² needs ≈ 60 GB.
python -m venv lumaguide-env
source lumaguide-env/bin/activate
pip install -r requirements.txtYou will also need:
- Flux.1-dev: downloaded automatically from Hugging Face on first run (~24 GB). Run
huggingface-cli loginif you don't already have gated-model access. regressor.pt: the pretrained text→histogram regressor (~1.1 MB) is bundled in this repo and is the default for--target regressor.
lumaguide.py is a single self-contained inference script. The target HDR luminance distribution can come from three sources:
--target |
what you provide | use case |
|---|---|---|
regressor |
a pretrained regressor.pt + caption |
open-ended text → HDR |
reference |
a reference .hdr / .exr image |
match an existing HDR's mood |
manual |
a 32-element .npy array (sums to 1) |
precise user-specified DR |
python lumaguide.py \
--prompt "A hot-air balloon launches at dawn over rolling farmland, the burner flame brilliantly bright against pre-dawn dusk." \
--output_hdr out/balloon.hdr \
--target regressor \
--regressor_ckpt regressor.ptpython lumaguide.py \
--prompt "A hot-air balloon launches at dawn over rolling farmland, the burner flame brilliantly bright against pre-dawn dusk." \
--output_hdr out/balloon_v2.hdr \
--target reference \
--reference my_reference.hdrConstruct any 32-bin distribution over PQ codes that sums to 1:
import numpy as np
# Example: low-key (mostly dark, narrow highlight peak around 800 cd/m²)
n = 32
hist = np.zeros(n, dtype=np.float32)
hist[:6] = np.linspace(2.0, 1.0, 6) # heavy shadow occupancy
hist[20:24] = 0.5 # small highlight bump
hist /= hist.sum()
np.save("low_key.npy", hist)python lumaguide.py \
--prompt "A hot-air balloon launches at dawn over rolling farmland, the burner flame brilliantly bright against pre-dawn dusk." \
--output_hdr out/balloon_v3.hdr \
--target manual --manual_hist low_key.npyFor each run the script writes:
<output_hdr>: Radiance.hdrin linear cd/m² (BT.2020 RGB primaries)<output_dir>/ev{-2,+0,+2}.png: diagnostic ACES Filmic + sRGB EV ladder
To view the HDR file: any of the standard tools work: pfsview, OCIO-aware DaVinci Resolve, the pfstools suite. The EV ladder PNGs let you preview shadow / midtone / highlight content separately on any sRGB display.
| flag | default | notes |
|---|---|---|
--s0 |
2000 |
W₁ guidance scale. 0 = vanilla Flux. Sweet spot 1000–3000 on Flux. |
--n_steps |
28 |
scheduler steps. Reducing increases speed but degrades alignment. |
--cfg_scale |
3.5 |
distilled-CFG strength for Flux (passed via guidance_emb). |
--schedule |
const |
guidance schedule. late_quad weights toward the clean stage. |
--n_bins |
32 |
histogram resolution. K=32 is the paper's sweet spot. |
--height/--width |
512 |
generation resolution. 512 fits in 30 GB VRAM, 1024 needs ≈ 60 GB. |
--seed |
42 |
RNG seed for the initial latent. |
--model_id |
black-forest-labs/FLUX.1-dev |
HF model id for the Flux backbone. |
test_prompts.csv ships the 100 HDR-leaning prompts used in the paper (512×512 by default). It has the columns prompt,width,height and can be batched directly through the script.
LumaGuide rests on two observations about how distribution constraints interact with diffusion sampling.
(i) Diffusion priors already encode rich semantics; HDR is a distributional mismatch. Pretrained image / video diffusion models reproduce the statistical biases of their training data, mostly 8-bit SDR content. They can generate plausible scenes but cannot reach the dynamic range of real HDR captures. LumaGuide leaves the semantic prior untouched and only constrains global luminance statistics, so the model is free to handle structure and content.
(ii) A permutation-invariant target lets the prior do the spatial work. At every denoising step we compute a soft, differentiable PQ-luminance histogram of the Tweedie estimate, take its Wasserstein-1 distance to a target histogram, and back-propagate through the VAE decoder only (the transformer is always called under torch.no_grad(), which is what makes the method zero-training). Because the histogram is permutation-invariant, LumaGuide only constrains which luminances appear and in what proportions, not where, which is exactly the part the diffusion prior is bad at.
The same objective extends to video by adding a Temporal Luminance Coherence (TLC) term that penalizes highlight flicker between frames, yielding zero-shot HDR video without retraining the backbone (release pending, see Roadmap).
LumaGuide reshapes generated PQ-luminance distributions toward HDR targets while preserving semantics. See the project page and Tables 1–3 in the paper for full quantitative results, including subjective JOD scores against HDR baselines.
Shipped today: ✅ Open: ⬜
- Reference PyTorch implementation (
lumaguide.py) - Soft differentiable histogram + Wasserstein-1 distance module
- PQ-space luminance utilities (PQ EOTF / inverse-EOTF, BT.2020 luminance)
- Sampler hooks for Flux.1-dev
- HDR I/O (Radiance
.hdr+.exr) and ACES Filmic EV-ladder diagnostics -
requirements.txtwith pinned minimums -
LICENSE(MIT; note Flux.1-dev's own non-commercial license applies) - Sampler hooks for SD3 and SDXL
- CogVideoX integration with Temporal Luminance Coherence (TLC)
- Hydra / YAML configs to reproduce all paper results
-
regressor.pt: pretrained text→histogram regressor (32-bin, ~300K params) -
test_prompts.csv: 100-prompt HDR test set used in the paper - Library of named target presets (
hdr_outdoor,low_key,neon, …) - Regressor training script + caption ↔ HDR histogram pairs
- Subjective-study stimuli + JOD scores (subject to data licensing)
- Single-prompt CLI demo (
lumaguide.py) -
notebooks/quickstart.ipynbwalkthrough - Colab notebook (free-tier GPU defaults)
- Hugging Face Space (Gradio)
- Scripts for Q-quality, Q-alignment, DRstops, JOD
- Reproduction scripts for Tables 1–3
- Baseline configs (LEDiff, BracketDiffusion, X2HDR)
- arXiv preprint + canonical citation
-
docs/method.md: soft-histogram gradient derivation -
CONTRIBUTING.md - Project page: video reel, author profile links
If you find LumaGuide useful, please cite:
@article{chen2026lumaguide,
title = {LumaGuide: Distribution Shaping for Training-Free HDR Generation in Diffusion Models},
author = {Chen, Bowen and Saini, Shreshth and Adsumilli, Balu and Bovik, Alan C.},
journal = {arXiv preprint arXiv:2607.26237},
year = {2026}
}This work was conducted at the Laboratory for Image and Video Engineering (LIVE), The University of Texas at Austin, with support from Google. We thank the authors of the projects our pipeline builds on:
Released under the MIT License. Flux.1-dev is governed by Black Forest Labs' own license (non-commercial); comply with both before redistribution.
For questions about the paper, code, or roadmap, please open an issue or reach out to the authors directly.


