LUCID

LUCID: Learning Unified Control for Image Deflaring and Exposure Mastery in Nighttime Photography

LUCID is a unified framework for nighttime image restoration. It targets the coupled degradations that often appear together in night photography: underexposure, intense flare, ghosting artifacts, and visible light sources.

Photography is the art of painting with light, yet nighttime scenes are shaped by competing degradations: intense flares obscure scene structure, while photon-limited regions collapse into noise. Conventional approaches address these factors in isolation, overlooking the fact that these degradations are fundamentally entangled. LUCID reframes nighttime restoration as a continuous and controllable process rather than a fixed correction, restoring challenging nighttime images with flexible control over exposure, light sources, flare, and ghosting artifacts.

Checkpoints

This repository contains the pretrained checkpoints used by the LUCID codebase:

File Description
LUCID_main/model_40000.pkl Main LUCID restoration checkpoint
Flare_Disentangle/latest.pth Flare disentanglement network checkpoint

The base diffusion model is SD-Turbo and should be downloaded separately:

https://huggingface.co/stabilityai/sd-turbo

Usage

Clone the code repository:

git clone https://github.com/frakenation/LUCID.git
cd LUCID

Download these checkpoints:

git lfs install
git clone https://huggingface.co/Unswear/LUCID lucid_weights

Example inference:

python -m src.inference \
  --input_dir ./data/test/input \
  --pretrained_model_name_or_path stabilityai/sd-turbo \
  --model_path ./lucid_weights/LUCID_main/model_40000.pkl \
  --flare_disentanglement_path ./lucid_weights/Flare_Disentangle/latest.pth \
  --output_dir ./results/lucid \
  --resolution 512 \
  --timestep 199 \
  --ms_unet \
  --inference_mode cfg_guidance \
  --cfg_scale 1.05 \
  --device cuda

For multi-scale exposure control, use src.inference_cfg_index or the provided shell scripts in the GitHub repository.

Links

Citation

If you find this project useful, please cite the paper from the project page or arXiv.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for Unswear/LUCID