[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82741":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":20,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":25,"discoverSource":26},82741,"ControlLight","yfyang007\u002FControlLight","yfyang007",null,"Python",96,8,53,2,0,16,34,48.26,false,"main",true,[],"2026-06-12 04:01:38","\u003Cdiv align=\"center\">\n  \u003Ch2>\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.25569\">ControlLight: Towards Controllable, Consistent, and Generalizable Low-Light Enhancement\u003C\u002Fa>\u003C\u002Fh2>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fyfyang007.github.io\u002FControlLight\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-blue.svg\" alt=\"Project Page\"\u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2605.25569\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingFace-Daily%20Papers-ffbf00.svg\" alt=\"Hugging Face Daily Papers\"\u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.25569\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2605.25569-b31b1b.svg\" alt=\"arXiv Paper\"\u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FControlLight\u002FControlLight\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingFace-Models-yellow.svg\" alt=\"Hugging Face Models\"\u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FControlLight\u002FLight100K\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingFace-Light100K-green.svg\" alt=\"Light100K Dataset\"\u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fyfyang007\u002FControlLight\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub-Code-black.svg\" alt=\"GitHub Code\"\u002F>\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fteaser.png\" alt=\"ControlLight teaser\" width=\"100%\"\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cvideo src=\"assets\u002Fcontrollight_homepage_hero_brightening_wechat.mp4\" controls width=\"100%\">\u003C\u002Fvideo>\n\u003C\u002Fp>\n\n## News\n\n- [2026\u002F05\u002F25] We have released the [ControlLight model weights](https:\u002F\u002Fhuggingface.co\u002FControlLight\u002FControlLight) on Hugging Face.\n- [2026\u002F05\u002F25] We have released [Light100K](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FControlLight\u002FLight100K), a continuous low-light enhancement dataset for controllable illumination learning.\n- [2026\u002F05\u002F25] We have released the ControlLight inference and training code.\n\n## Note\n\nControlLight requires about 21 GB of VRAM for inference. Although the released model was trained with a fixed prompt setting, you can also try editing the prompt to explore additional light-control effects, such as color and atmosphere. We welcome broader experimentation.\n\n## TODO\n\n- [x] Open-source the inference scripts.\n- [x] Open-source the training scripts.\n- [x] Release Light100K on Hugging Face.\n- [x] Open-source the ControlLight model weights.\n- [ ] Release the bidirectional light-control model.\n\n## Quick Start\n\n### 1. Installation\n\nThis project relies on the patched local `diffusers\u002F` checkout in this repository and uses a unified `controlight` environment for inference and training.\n\n- Python: `3.12` is recommended.\n- Base model: [black-forest-labs\u002FFLUX.2-klein-base-9B](https:\u002F\u002Fhuggingface.co\u002Fblack-forest-labs\u002FFLUX.2-klein-base-9B).\n- ControlLight LoRA: [ControlLight\u002FControlLight](https:\u002F\u002Fhuggingface.co\u002FControlLight\u002FControlLight).\n- Dataset: [ControlLight\u002FLight100K](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FControlLight\u002FLight100K).\n\n```bash\nconda create -n controlight python=3.12 -y\nconda activate controlight\n\npython -m pip install --upgrade pip\npython -m pip install -e diffusers\npython -m pip install -r requirements.txt\npython -m pip install -e .\n```\n\nYou can verify the environment with:\n\n```bash\nbash scripts\u002Fpredict.sh --help\nbash scripts\u002Fdemo.sh --help\nbash -lc 'source scripts\u002Fproject_env.sh; python run.py --help >\u002Fdev\u002Fnull'\n```\n\n### 2. Prepare Models\n\nDownload or place the required model assets under `models\u002F` or provide explicit paths through command-line arguments.\n\n```text\nmodels\u002F\n  FLUX.2-klein-base-9B\u002F      # FLUX.2 [klein] 9B base model\n  controllight.safetensors   # ControlLight LoRA checkpoint\n  flux2_vae\u002Fae.safetensors   # VAE path used by the training config, if needed\n```\n\nThe default public training config uses `.\u002Fmodels\u002FFLUX.2-klein-base-9B`. You can also pass:\n\n```bash\n--model-path \u002Fpath\u002Fto\u002FFLUX.2-klein-base-9B\n--lora-path \u002Fpath\u002Fto\u002Fcontrollight.safetensors\n```\n\n### 3. Recommended Inference Config\n\n- Device: `cuda`\n- Torch dtype: `bfloat16`\n- Inference steps: `20`\n- Guidance scale: `1.0`\n- Recommended seed: `42`\n- Enhancement strength: `alpha` in `[0, 1]`, where larger values produce stronger low-light enhancement.\n\n## ControlLight Inference\n\n### Single Image\n\n```bash\nbash scripts\u002Fpredict.sh predict-image \\\n  --input \u002Fpath\u002Fto\u002Finput.jpg \\\n  --output \u002Fpath\u002Fto\u002Foutput.png \\\n  --model-path \u002Fpath\u002Fto\u002FFLUX.2-klein-base-9B \\\n  --lora-path \u002Fpath\u002Fto\u002Fcontrollight.safetensors \\\n  --alpha 0.50 \\\n  --num-inference-steps 20 \\\n  --guidance-scale 1.0 \\\n  --seed 42 \\\n  --device cuda \\\n  --torch-dtype bfloat16\n```\n\n### Four-Strength Sweep\n\nThe public sweep generates controllable enhancement results at `0.25`, `0.50`, `0.75`, and `1.00`.\n\n```bash\nbash scripts\u002Fpredict.sh predict-four \\\n  --input \u002Fpath\u002Fto\u002Fimages \\\n  --output \u002Fpath\u002Fto\u002Fout_four \\\n  --model-path \u002Fpath\u002Fto\u002FFLUX.2-klein-base-9B \\\n  --lora-path \u002Fpath\u002Fto\u002Fcontrollight.safetensors \\\n  --num-inference-steps 20 \\\n  --seed 42 \\\n  --device cuda \\\n  --torch-dtype bfloat16\n```\n\n### Custom Strength Sweep\n\n```bash\nbash scripts\u002Fpredict.sh predict-strengths \\\n  --input \u002Fpath\u002Fto\u002Fimages \\\n  --output \u002Fpath\u002Fto\u002Fout_strengths \\\n  --model-path \u002Fpath\u002Fto\u002FFLUX.2-klein-base-9B \\\n  --lora-path \u002Fpath\u002Fto\u002Fcontrollight.safetensors \\\n  --alphas 0.20,0.40,0.60,0.80 \\\n  --num-inference-steps 20 \\\n  --seed 42 \\\n  --device cuda \\\n  --torch-dtype bfloat16\n```\n\n`predict-four` and `predict-strengths` accept either a plain image directory or a `design_materials` root containing `sources\u002F`.\n\nThe batch output contains:\n\n```text\nmanifest.json\nsources\u002F\u003Cslug>.png\nresults\u002F\u003Cslug>\u002Finput.jpg\nresults\u002F\u003Cslug>\u002Fgrid.jpg\nresults\u002F\u003Cslug>\u002Fcomparison.gif\nresults\u002F\u003Cslug>\u002Foutputs\u002F*.png\nresults\u002F\u003Cslug>\u002Fmetadata.json\n```\n\n## Local Demo\n\n```bash\nbash scripts\u002Fdemo.sh \\\n  --host 0.0.0.0 \\\n  --port 7860 \\\n  --model-path \u002Fpath\u002Fto\u002FFLUX.2-klein-base-9B \\\n  --lora-path \u002Fpath\u002Fto\u002Fcontrollight.safetensors \\\n  --device cuda \\\n  --torch-dtype bfloat16\n```\n\n## Training\n\nControlLight is trained as a LoRA on top of FLUX.2 [klein] 9B with continuous low-light enhancement supervision from Light100K.\n\n### Dataset Configuration\n\nDownload [Light100K](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FControlLight\u002FLight100K) and organize the training subset according to the paths used by `config\u002Ftrain_flux2klein_lora.yaml`.\n\nThe default config expects:\n\n```text\ndatasets\u002Fflux2klein_alpha_interp5_20260501_unified_edgeexp\u002F\n  control\u002F\n  mask_normrgb_l01\u002F\n  mask_normrgb_l02\u002F\n  mask_normrgb_l03\u002F\n  mask_normrgb_l04\u002F\n  mask_normrgb_l05\u002F\n  target_l01\u002F\n  target_l02\u002F\n  target_l03\u002F\n  target_l04\u002F\n  target_l05\u002F\n```\n\nEach `target_lXX` folder corresponds to one enhancement level. The training config maps these levels to LoRA network weights from `0.2` to `1.0`, while `control\u002F` stores the original low-light inputs and `mask_normrgb_lXX\u002F` stores the corresponding light-control masks.\n\nIf your dataset root differs, duplicate `config\u002Ftrain_flux2klein_lora.yaml` and update `folder_path`, `control_path`, and `mask_path`.\n\n### Training Scripts\n\nMain config:\n\n- `config\u002Ftrain_flux2klein_lora.yaml`\n\nPublic training entrypoints:\n\n- `scripts\u002Ftrain\u002Ftrain_local.sh`\n- `scripts\u002Ftrain\u002Ftrain_multigpu.sh`\n- `scripts\u002Ftrain\u002Ftrain_watchdog.sh`\n\nLocal or default multi-GPU launch:\n\n```bash\nbash scripts\u002Ftrain\u002Ftrain_local.sh\n```\n\nExplicit distributed launch:\n\n```bash\nCONFIG=.\u002Fconfig\u002Ftrain_flux2klein_lora.yaml \\\nGPUS=0,1,2,3 \\\nNUM_PROCESSES=4 \\\nMAIN_PROCESS_PORT=30000 \\\nbash scripts\u002Ftrain\u002Ftrain_multigpu.sh\n```\n\nKeep training alive with automatic resume:\n\n```bash\nbash scripts\u002Ftrain\u002Ftrain_watchdog.sh\n```\n\nUseful overrides:\n\n```bash\nRUN_NAME=my_controllight_run \\\nCONFIG=.\u002Fconfig\u002Ftrain_flux2klein_lora.yaml \\\nCUDA_VISIBLE_DEVICES=0,1,2,3 \\\nNUM_PROCESSES=4 \\\nCONDA_ENV=controlight \\\nbash scripts\u002Ftrain\u002Ftrain_local.sh\n```\n\nMore details are available in [`scripts\u002Ftrain\u002FREADME.md`](scripts\u002Ftrain\u002FREADME.md).\n\n## Repository Layout\n\n```text\nControlLight\u002F           Python package and public CLIs\nconfig\u002F                 Public training config\ndiffusers\u002F              Vendored local diffusers checkout\ndocs\u002F                   Installation notes\nextensions\u002F             Training extensions used by the stack\nextensions_built_in\u002F    Built-in model and trainer integrations\njobs\u002F                   Training job launcher code\nscripts\u002F                Public shell entrypoints\ntoolkit\u002F                Core training and inference helpers\npredict.py              Public prediction entrypoint\nserve_demo.py           Public local demo entrypoint\nrun.py                  Training launcher\n```\n\n## Citation\n\nIf you find ControlLight useful in your research, please star and cite:\n\n```bibtex\n@misc{yang2026controllightcontrollableconsistentgeneralizable,\n      title={ControlLight: Towards Controllable, Consistent, and Generalizable Low-Light Enhancement}, \n      author={Yufeng Yang and Jianzhuang Liu and Jisheng Chu and Yuqi Peng and Xianfang Zeng and Jiancheng Huang and Shifeng Chen},\n      year={2026},\n      eprint={2605.25569},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.25569}, \n}\n```\n","ControlLight 是一个用于低光照增强的项目，旨在实现可控、一致且泛化的图像亮度提升。其核心功能包括通过深度学习模型对暗光图片进行智能提亮，并支持用户自定义光照效果如色彩和氛围调整。技术上，该项目基于 Python 开发，利用了 LoRA（Low-Rank Adaptation）技术和 Hugging Face 平台上的 FLUX.2 模型作为基础架构。适用于需要在保持图像细节的同时提高图像亮度的各种场景，比如夜间摄影照片处理、视频监控画面优化等。","2026-06-11 04:09:05","CREATED_QUERY"]