RawMoment / README.md
yscript's picture
Remove Visual results section
7ecd418 verified
|
Raw History Blame
6.84 kB
---
base_model: Qwen/Qwen-Image-2.1
pipeline_tag: image-to-image
tags:
- rawmoment
- raw-to-rgb
- motion-deblurring
- lora
---
# RawMoment: Recovering the Sharp Moment via Generative RAW-to-RGB Deblurring
Trained checkpoints accompanying the paper.
[Code](https://github.com/script-Yang/rawmoment) · [Dataset](https://huggingface.co/datasets/yscript/RawMoment)
## Dataset examples
Three 1024 × 1024 samples from the RawMoment training set. RAW panels show the Bayer layout; clean RAW retains the low-light degradation and sensor noise. Click an image to view it at full resolution.
<table>
<tr><th>Clean RAW</th><th>Blur RAW</th><th>Blur RGB</th><th>Clean RGB</th></tr>
<tr><th colspan="4">Lemon grove</th></tr>
<tr>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_clean_raw.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_clean_raw.png" alt="RawMoment training sample, Lemon grove, 1024 × 1024: Clean RAW" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_blur_raw.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_blur_raw.png" alt="RawMoment training sample, Lemon grove, 1024 × 1024: Blur RAW" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_blur_rgb.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_blur_rgb.png" alt="RawMoment training sample, Lemon grove, 1024 × 1024: Blur RGB" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_clean_rgb.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_lemon_grove_1024_clean_rgb.png" alt="RawMoment training sample, Lemon grove, 1024 × 1024: Clean RGB" width="200"></a></td>
</tr>
<tr><th colspan="4">Snowy lake</th></tr>
<tr>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_clean_raw.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_clean_raw.png" alt="RawMoment training sample, Snowy lake, 1024 × 1024: Clean RAW" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_blur_raw.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_blur_raw.png" alt="RawMoment training sample, Snowy lake, 1024 × 1024: Blur RAW" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_blur_rgb.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_blur_rgb.png" alt="RawMoment training sample, Snowy lake, 1024 × 1024: Blur RGB" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_clean_rgb.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_snowy_lake_1024_clean_rgb.png" alt="RawMoment training sample, Snowy lake, 1024 × 1024: Clean RGB" width="200"></a></td>
</tr>
<tr><th colspan="4">Terraced waterfall</th></tr>
<tr>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_clean_raw.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_clean_raw.png" alt="RawMoment training sample, Terraced waterfall, 1024 × 1024: Clean RAW" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_blur_raw.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_blur_raw.png" alt="RawMoment training sample, Terraced waterfall, 1024 × 1024: Blur RAW" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_blur_rgb.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_blur_rgb.png" alt="RawMoment training sample, Terraced waterfall, 1024 × 1024: Blur RGB" width="200"></a></td>
<td><a href="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_clean_rgb.png"><img src="https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/training_terraced_waterfall_1024_clean_rgb.png" alt="RawMoment training sample, Terraced waterfall, 1024 × 1024: Clean RGB" width="200"></a></td>
</tr>
</table>
## Method overview
![RawMoment framework](https://huggingface.co/yscript/RawMoment/resolve/main/assets/visuals/framework.jpg)
RawMoment adapts a RAW encoder to the pretrained RGB latent space, then restores sharp RGB images with spatial and sensor-physics conditioning.
## Checkpoints
| Training resolution | VAE | DiT |
| --- | --- | --- |
| 512 × 512 | [stage1-vae](512/stage1-vae.safetensors) | [stage2-dit](512/stage2-dit.safetensors) |
| 1024 × 1024 | [stage1-vae](1024/stage1-vae.safetensors) | [stage2-dit](1024/stage2-dit.safetensors) |
All four checkpoints are from 100,000 training steps and stored in FP32.
`stage1-vae` contains the trained RAW encoder and quantization convolution. `stage2-dit` contains the attention LoRA and RAW/physical conditioning modules. The frozen backbone and shared RGB VAE are loaded from [Qwen-Image-2.1](https://huggingface.co/Qwen/Qwen-Image-2.1).
## Usage
From the code repository, download the checkpoints into `weights/`:
```bash
hf auth login
hf download yscript/RawMoment --repo-type model --local-dir weights \
--include '512/*' '1024/*'
```
Use a `stage1-vae`/`stage2-dit` pair trained at the same resolution. Follow the [code README](https://github.com/script-Yang/rawmoment#inference) for installation and inference.
Checkpoint details are listed in `manifest.json`; file hashes are in `SHA256SUMS`.
## Acknowledgments
We thank the [Qwen-Image team](https://huggingface.co/Qwen/Qwen-Image-2.1) for making the pretrained model available.
## Citation
If you use RawMoment in your research, please cite:
```bibtex
@misc{yang2026rawmoment,
title={{RawMoment}: Recovering the Sharp Moment via Generative {RAW}-to-{RGB} Deblurring},
author={Sicheng Yang and Song Fei and Tian Ye and Jianan Sun and Bin Chen and Yu Wang and Lei Zhu},
year={2026},
note={Preprint}
}
```