Instructions to use fal/control-light with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use fal/control-light with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("fal/control-light", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 5,224 Bytes
d4d5ef8 9feddbb d4d5ef8 9feddbb d4d5ef8 9feddbb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | ---
base_model:
- black-forest-labs/FLUX.2-klein-base-9B
datasets:
- ControlLight/Light100K
language:
- en
- zh
license: apache-2.0
library_name: diffusers
pipeline_tag: image-to-image
---
<h1>Original Repository: <a href="https://huggingface.co/ControlLight/ControlLight" target="_blank">ControlLight/ControlLight</a></h1>
<div align="center">
# ControlLight: Towards Controllable, Consistent, and Generalizable Low-Light Enhancement
[](https://arxiv.org/abs/2605.25569)
[](https://yfyang007.github.io/ControlLight/)
[](https://github.com/yfyang007/ControlLight)
[](https://huggingface.co/datasets/ControlLight/Light100K)
[](https://huggingface.co/ControlLight/ControlLight)
</div>
ControlLight is presented in the paper **[ControlLight: Towards Controllable, Consistent, and Generalizable Low-Light Enhancement](https://huggingface.co/papers/2605.25569)**.
ControlLight is a controllable low-light enhancement model built on top of **FLUX.2 [klein] 9B**. It is trained as a LoRA for continuous illumination enhancement, enabling users to adjust enhancement strength with a controllable parameter `alpha`. The model is designed to enhance low-light images while preserving the original scene structure, visual content, and fine-grained details.
## 🔥🔥🔥 News!!
- **May 2026:** 👋 We release **ControlLight**, its model weights, inference and training code.
- **May 2026:** 👋 We release **Light100K**, a continuous low-light enhancement dataset for controllable illumination learning.
## ⚡️ Model Usage
### Installation
This project currently relies on the patched local `diffusers/` checkout from the ControlLight repository.
```bash
git clone https://github.com/yfyang007/ControlLight.git
cd ControlLight
conda create -n controlight python=3.12 -y
conda activate controlight
python -m pip install --upgrade pip
python -m pip install -e diffusers
python -m pip install -r requirements.txt
python -m pip install -e .
```
You can verify the environment with:
```bash
bash scripts/predict.sh --help
bash scripts/demo.sh --help
bash -lc 'source scripts/project_env.sh; python run.py --help >/dev/null'
```
### Inference with ControlLight
```bash
bash scripts/predict.sh predict-image \
--input /path/to/input.jpg \
--output /path/to/output.png \
--model-path /path/to/FLUX.2-klein-base-9B \
--lora-path /path/to/controllight.safetensors \
--alpha 0.50 \
--num-inference-steps 20 \
--guidance-scale 1.0 \
--seed 42 \
--device cuda \
--torch-dtype bfloat16
```
### CLI Quick Start
```bash
bash scripts/predict.sh predict-four \
--input /path/to/images \
--output /path/to/out_four \
--model-path /path/to/FLUX.2-klein-base-9B \
--lora-path /path/to/controllight.safetensors \
--num-inference-steps 20 \
--seed 42 \
--device cuda \
--torch-dtype bfloat16
```
### Recommended Inference Config
- **Device:** `cuda`
- **Torch dtype:** `bfloat16`
- **Inference steps:** `20`
- **Guidance scale:** `1.0`
- **Recommended seed:** `42`
- **Enhancement strength:** `alpha` in `[0, 1]`, where larger values produce stronger low-light enhancement.
### Example Settings
| Task | Setting |
| --- | --- |
| Mild Low-light Enhancement | `alpha=0.25` |
| Medium Low-light Enhancement | `alpha=0.50` |
| Strong Low-light Enhancement | `alpha=0.75` |
| Full Low-light Enhancement | `alpha=1.00` |
| Custom Enhancement Sweep | `--alphas 0.20,0.40,0.60,0.80` |
## Additional Resources
- **Project Page:** [ControlLight Project Page](https://yfyang007.github.io/ControlLight/)
- **GitHub Repository:** [yfyang007/ControlLight](https://github.com/yfyang007/ControlLight)
- **Model:** [ControlLight/ControlLight](https://huggingface.co/ControlLight/ControlLight)
- **Dataset:** [ControlLight/Light100K](https://huggingface.co/datasets/ControlLight/Light100K)
- **Base Model:** [black-forest-labs/FLUX.2-klein-base-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B)
## License and Disclaimer
The code of ControlLight is intended to be released under the Apache License 2.0.
ControlLight is built on top of **FLUX.2 [klein] 9B** and uses third-party components, datasets, and model assets. All underlying base models and third-party components remain governed by their original licenses and terms. Users must comply with all applicable upstream licenses when using this project.
## Citation
If you find ControlLight useful in your research, please star and cite:
```bibtex
@misc{yang2026controllightcontrollableconsistentgeneralizable,
title={ControlLight: Towards Controllable, Consistent, and Generalizable Low-Light Enhancement},
author={Yufeng Yang and Jianzhuang Liu and Jisheng Chu and Yuqi Peng and Xianfang Zeng and Jiancheng Huang and Shifeng Chen},
year={2026},
eprint={2605.25569},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2605.25569},
}
``` |