ZhengmingYu commited on
Commit
23c5b5f
·
verified ·
1 Parent(s): 8fce485

Add DiffHDR model card

Browse files
Files changed (1) hide show
  1. README.md +180 -0
README.md ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Wan-AI/Wan2.1-VACE-14B
4
+ base_model_relation: adapter
5
+ tags:
6
+ - lora
7
+ - safetensors
8
+ - diffsynth
9
+ - diffusion
10
+ - video-to-video
11
+ - image-to-image
12
+ - hdr
13
+ - ldr-to-hdr
14
+ - inverse-tone-mapping
15
+ - panorama
16
+ - wan2.1
17
+ - vace
18
+ ---
19
+
20
+ # DiffHDR
21
+
22
+ DiffHDR reconstructs high-dynamic-range (HDR) radiance from low-dynamic-range
23
+ (LDR) videos and images using LoRA-finetuned
24
+ [Wan2.1-VACE-14B](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B). It formulates
25
+ LDR-to-HDR conversion as generative radiance inpainting in Log-Gamma space and
26
+ supports text- and reference-image-guided reconstruction.
27
+
28
+ - **Paper:** [DiffHDR: Re-Exposing LDR Videos with Video Diffusion Models](https://arxiv.org/abs/2604.06161)
29
+ - **Code and full inference instructions:** [Eyeline-Labs/DiffHDR](https://github.com/Eyeline-Labs/DiffHDR)
30
+ - **Base model:** [Wan-AI/Wan2.1-VACE-14B](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B)
31
+
32
+ ## Model files
33
+
34
+ This repository contains LoRA adapters, not a standalone model. Download the
35
+ base model separately before running inference.
36
+
37
+ | File | Intended inference entry points |
38
+ | --- | --- |
39
+ | `DiffHDR.safetensors` | `infer_video.py`, `infer_image.py`, and `infer_long_video.py` |
40
+ | `DiffHDR_Pano.safetensors` | `infer_hdri.py` for 360-degree HDR panoramas |
41
+
42
+ ## Setup
43
+
44
+ Clone and install the inference code:
45
+
46
+ ```bash
47
+ git clone https://github.com/Eyeline-Labs/DiffHDR.git
48
+ cd DiffHDR
49
+
50
+ conda create -n diffhdr python=3.10 -y
51
+ conda activate diffhdr
52
+
53
+ pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 \
54
+ --index-url https://download.pytorch.org/whl/cu118
55
+ pip install -e .
56
+ pip install -r requirements.txt
57
+ ```
58
+
59
+ Download the base model and the DiffHDR adapters:
60
+
61
+ ```bash
62
+ hf download Wan-AI/Wan2.1-VACE-14B \
63
+ --local-dir models/Wan-AI/Wan2.1-VACE-14B
64
+
65
+ hf download ZhengmingYu/DiffHDR --local-dir models
66
+ ```
67
+
68
+ The Wan2.1-VACE-14B download is approximately 75 GB and is not included in this
69
+ repository. Set `MODEL_BASE` if you store the base model somewhere other than
70
+ `models/`.
71
+
72
+ ## Inference
73
+
74
+ Minimal video example:
75
+
76
+ ```bash
77
+ python infer_video.py \
78
+ --lora_path models/DiffHDR.safetensors \
79
+ --input_path demo/room_window.mp4 \
80
+ --output_dir results/video_mp4 \
81
+ --prompt "" \
82
+ --num_inference_steps 10 \
83
+ --add_mask --use_under_exposure_mask --crop_and_resize --srgb_to_lg
84
+ ```
85
+
86
+ Additional entry points:
87
+
88
+ ```bash
89
+ # Single image
90
+ python infer_image.py \
91
+ --lora_path models/DiffHDR.safetensors \
92
+ --input_path demo/sample_image.png \
93
+ --output_dir results/image_output \
94
+ --prompt ""
95
+
96
+ # Long video using overlapping temporal windows
97
+ python infer_long_video.py \
98
+ --lora_path models/DiffHDR.safetensors \
99
+ --input_path demo/long_video_frames \
100
+ --output_dir results/long_video_output \
101
+ --prompt "" \
102
+ --window_size 33 --window_stride 16 \
103
+ --use_prev_window_reference \
104
+ --add_mask --crop_and_resize --srgb_to_lg
105
+
106
+ # 360-degree LDR panorama to HDR panorama
107
+ python infer_hdri.py \
108
+ --lora_path models/DiffHDR_Pano.safetensors \
109
+ --input_path demo/sample_pano.png \
110
+ --output_dir results/hdri_output
111
+ ```
112
+
113
+ The inference scripts write linear HDR OpenEXR output. Video inference writes
114
+ one EXR file per frame; panorama inference writes `predicted.exr`. See the
115
+ [code repository README](https://github.com/Eyeline-Labs/DiffHDR#inference) for
116
+ text conditioning, reference-image conditioning, arguments, and additional
117
+ examples.
118
+
119
+ ## Intended use
120
+
121
+ DiffHDR is intended for research and creative LDR-to-HDR reconstruction,
122
+ including:
123
+
124
+ - reconstructing HDR video or still images from LDR input;
125
+ - recovering plausible highlight and shadow content for display and
126
+ post-production workflows;
127
+ - text- or reference-image-guided HDR reconstruction; and
128
+ - reconstructing HDR environment panoramas.
129
+
130
+ ## Limitations and responsible use
131
+
132
+ - Detail in clipped or quantized regions is generated by the model. It is a
133
+ plausible reconstruction and is not guaranteed to reproduce the original
134
+ scene radiance.
135
+ - Outputs may contain hallucinated detail, temporal inconsistency, color
136
+ shifts, or exposure artifacts, especially on inputs outside the training
137
+ distribution.
138
+ - Results can vary with prompts, reference images, random seeds, and inference
139
+ settings.
140
+ - The model inherits limitations and potential biases from its base model and
141
+ training data.
142
+ - Do not use generated output as a calibrated radiometric measurement, as
143
+ forensic evidence, or in safety-critical decisions.
144
+ - Users are responsible for ensuring that their input media and intended use
145
+ comply with applicable rights, licenses, and laws.
146
+
147
+ ## Training and evaluation
148
+
149
+ DiffHDR is trained as a LoRA adapter on top of Wan2.1-VACE-14B. The training
150
+ approach uses synthetic HDR video data derived from static HDR environment maps
151
+ to address the scarcity of paired HDR video data. Method details, experimental
152
+ settings, and comparisons are reported in the
153
+ [paper](https://arxiv.org/abs/2604.06161).
154
+
155
+ ## License
156
+
157
+ The DiffHDR LoRA adapter weights in this repository are released under the
158
+ [Apache License 2.0](LICENSE).
159
+
160
+ The Wan2.1-VACE-14B base weights are distributed separately and remain subject
161
+ to their own license and model-card guidance. This license does not grant rights
162
+ to third-party code, datasets, or user-supplied input content.
163
+
164
+ ## Citation
165
+
166
+ ```bibtex
167
+ @article{yu2026diffhdr,
168
+ title={DiffHDR: Re-Exposing LDR Videos with Video Diffusion Models},
169
+ author={Yu, Zhengming and Ma, Li and He, Mingming and Isikdogan, Leo and Xu, Yuancheng and Smirnov, Dmitriy and Salamanca, Pablo and Mi, Dao and Delgado, Pablo and Yu, Ning and others},
170
+ journal={arXiv preprint arXiv:2604.06161},
171
+ year={2026}
172
+ }
173
+ ```
174
+
175
+ ## Acknowledgements
176
+
177
+ DiffHDR builds on
178
+ [Wan2.1-VACE-14B](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B) and
179
+ [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio). Please also
180
+ credit and follow the license terms of these upstream projects.