[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71987":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},71987,"IC-Light","lllyasviel\u002FIC-Light","lllyasviel","More relighting!","",null,"Python",8442,524,60,103,0,4,8,21,12,39.16,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:02:57","# IC-Light\n\nIC-Light is a project to manipulate the illumination of images.\n\nThe name \"IC-Light\" stands for **\"Imposing Consistent Light\"** (we will briefly describe this at the end of this page).\n\nCurrently, we release two types of models: text-conditioned relighting model and background-conditioned model. Both types take foreground images as inputs.\n\n**Note that \"iclightai dot com\" is a scam website. They have no relationship with us. Do not give scam websites money! This GitHub repo is the only official IC-Light.**\n\n# News\n\n[Alternative model](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fdiscussions\u002F109) for stronger illumination modifications.\n\nSome news about flux is [here](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fdiscussions\u002F98). (A fix [update](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fdiscussions\u002F98#discussioncomment-11370266) is added at Nov 25, more demos will be uploaded soon.)\n\n# Get Started\n\nBelow script will run the text-conditioned relighting model:\n\n    git clone https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light.git\n    cd IC-Light\n    conda create -n iclight python=3.10\n    conda activate iclight\n    pip install torch torchvision --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu121\n    pip install -r requirements.txt\n    python gradio_demo.py\n\nOr, to use background-conditioned demo:\n\n    python gradio_demo_bg.py\n\nModel downloading is automatic.\n\nNote that the \"gradio_demo.py\" has an official [huggingFace Space here](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Flllyasviel\u002FIC-Light).\n\n# Screenshot\n\n### Text-Conditioned Model\n\n(Note that the \"Lighting Preference\" are just initial latents - eg., if the Lighting Preference is \"Left\" then initial latent is left white right black.)\n\n---\n\n**Prompt: beautiful woman, detailed face, warm atmosphere, at home, bedroom**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F87265483-aa26-4d2e-897d-b58892f5fdd7)\n\n---\n\n**Prompt: beautiful woman, detailed face, sunshine from window**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F148c4a6d-82e7-4e3a-bf44-5c9a24538afc)\n\n---\n\n**beautiful woman, detailed face, neon, Wong Kar-wai, warm**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Ff53c9de2-534a-42f4-8272-6d16a021fc01)\n\n---\n\n**Prompt: beautiful woman, detailed face, sunshine, outdoor, warm atmosphere**\n\nLighting Preference: Right\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F25d6ea24-a736-4a0b-b42d-700fe8b2101e)\n\n---\n\n**Prompt: beautiful woman, detailed face, sunshine, outdoor, warm atmosphere**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fdd30387b-0490-46ee-b688-2191fb752e68)\n\n---\n\n**Prompt: beautiful woman, detailed face, sunshine from window**\n\nLighting Preference: Right\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F6c9511ca-f97f-401a-85f3-92b4442000e3)\n\n---\n\n**Prompt: beautiful woman, detailed face, shadow from window**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fe73701d5-890e-4b15-91ee-97f16ea3c450)\n\n---\n\n**Prompt: beautiful woman, detailed face, sunset over sea**\n\nLighting Preference: Right\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fff26ac3d-1b12-4447-b51f-73f7a5122a05)\n\n---\n\n**Prompt: handsome boy, detailed face, neon light, city**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fd7795e02-46f7-444f-93e7-4d6460840437)\n\n---\n\n**Prompt: beautiful woman, detailed face, light and shadow**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F706f70a8-d1a0-4e0b-b3ac-804e8e231c0f)\n\n(beautiful woman, detailed face, soft studio lighting)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Ffe0a72df-69d4-4e11-b661-fb8b84d0274d)\n\n---\n\n**Prompt: Buddha, detailed face, sci-fi RGB glowing, cyberpunk**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F68d60c68-ce23-4902-939e-11629ccaf39a)\n\n---\n\n**Prompt: Buddha, detailed face, natural lighting**\n\nLighting Preference: Left\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F1841d23d-0a0d-420b-a5ab-302da9c47c17)\n\n---\n\n**Prompt: toy, detailed face, shadow from window**\n\nLighting Preference: Bottom\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fdcb97439-ea6b-483e-8e68-cf5d320368c7)\n\n---\n\n**Prompt: toy, detailed face, sunset over sea**\n\nLighting Preference: Right\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F4f78b897-621d-4527-afa7-78d62c576100)\n\n---\n\n**Prompt: dog, magic lit, sci-fi RGB glowing, studio lighting**\n\nLighting Preference: Bottom\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F1db9cac9-8d3f-4f40-82e2-e3b0cafd8613)\n\n---\n\n**Prompt: mysteriou human, warm atmosphere, warm atmosphere, at home, bedroom**\n\nLighting Preference: Right\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F5d5aa7e5-8cbd-4e1f-9f27-2ecc3c30563a)\n\n---\n\n### Background-Conditioned Model\n\nThe background conditioned model does not require careful prompting. One can just use simple prompts like \"handsome man, cinematic lighting\".\n\n---\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F0b2a889f-682b-4393-b1ec-2cabaa182010)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F477ca348-bd47-46ff-81e6-0ffc3d05feb2)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F5bc9d8d9-02cd-442e-a75c-193f115f2ad8)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fa35e4c57-e199-40e2-893b-cb1c549612a9)\n\n---\n\nA more structured visualization:\n\n![r1](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fc1daafb5-ac8b-461c-bff2-899e4c671ba3)\n\n# Imposing Consistent Light\n\nIn HDR space, illumination has a property that all light transports are independent. \n\nAs a result, the blending of appearances of different light sources is equivalent to the appearance with mixed light sources:\n\n![cons](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F27c67787-998e-469f-862f-047344e100cd)\n\nUsing the above [light stage](https:\u002F\u002Fwww.pauldebevec.com\u002FResearch\u002FLS\u002F) as an example, the two images from the \"appearance mixture\" and \"light source mixture\" are consistent (mathematically equivalent in HDR space, ideally).\n\nWe imposed such consistency (using MLPs in latent space) when training the relighting models.\n\nAs a result, the model is able to produce highly consistent relight - **so** consistent that different relightings can even be merged as normal maps! Despite the fact that the models are latent diffusion.\n\n![r2](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F25068f6a-f945-4929-a3d6-e8a152472223)\n\nFrom left to right are inputs, model outputs relighting, devided shadow image, and merged normal maps. Note that the model is not trained with any normal map data. This normal estimation comes from the consistency of relighting.\n\nYou can reproduce this experiment using this button (it is 4x slower because it relight image 4 times)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Fd9c37bf7-2136-446c-a9a5-5a341e4906de)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Ffcf5dd55-0309-4e8e-9721-d55931ea77f0)\n\nBelow are bigger images (feel free to try yourself to get more results!)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F12335218-186b-4c61-b43a-79aea9df8b21)\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F2daab276-fdfa-4b0c-abcb-e591f575598a)\n\nFor reference, [geowizard](https:\u002F\u002Ffuxiao0719.github.io\u002Fprojects\u002Fgeowizard\u002F) (geowizard is a really great work!):\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002F4ba1a96d-e218-42ab-83ae-a7918d56ee5f)\n\nAnd, [switchlight](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.18848) (switchlight is another great work!):\n\n![image](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FIC-Light\u002Fassets\u002F19834515\u002Ffbdd961f-0b26-45d2-802e-ffd734affab8)\n\n# Model Notes\n\n* **iclight_sd15_fc.safetensors** - The default relighting model, conditioned on text and foreground. You can use initial latent to influence the relighting.\n\n* **iclight_sd15_fcon.safetensors** - Same as \"iclight_sd15_fc.safetensors\" but trained with offset noise. Note that the default \"iclight_sd15_fc.safetensors\" outperform this model slightly in a user study. And this is the reason why the default model is the model without offset noise.\n\n* **iclight_sd15_fbc.safetensors** - Relighting model conditioned with text, foreground, and background.\n\nAlso, note that the original [BRIA RMBG 1.4](https:\u002F\u002Fhuggingface.co\u002Fbriaai\u002FRMBG-1.4) is for non-commercial use. If you use IC-Light in commercial projects, replace it with other background replacer like [BiRefNet](https:\u002F\u002Fgithub.com\u002FZhengPeng7\u002FBiRefNet).\n\n# Cite\n\n    @inproceedings{\n        zhang2025scaling,\n        title={Scaling In-the-Wild Training for Diffusion-based Illumination Harmonization and Editing by Imposing Consistent Light Transport},\n        author={Lvmin Zhang and Anyi Rao and Maneesh Agrawala},\n        booktitle={The Thirteenth International Conference on Learning Representations},\n        year={2025},\n        url={https:\u002F\u002Fopenreview.net\u002Fforum?id=u1cQYxRI1H}\n    }\n\n# Related Work\n\nAlso read ...\n\n[Total Relighting: Learning to Relight Portraits for Background Replacement](https:\u002F\u002Faugmentedperception.github.io\u002Ftotal_relighting\u002F)\n\n[Relightful Harmonization: Lighting-aware Portrait Background Replacement](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.06886)\n\n[SwitchLight: Co-design of Physics-driven Architecture and Pre-training Framework for Human Portrait Relighting](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.18848)\n","IC-Light 是一个用于图像光照调整的项目。它提供了两种类型的模型：文本条件光照调整模型和背景条件光照调整模型，均以前景图像作为输入，能够根据用户指定的光照偏好或背景条件对图像进行光照效果修改。该项目使用 Python 开发，支持通过简单的命令行操作启动，并且有基于 Gradio 的交互式演示界面。IC-Light 适用于需要对照片或设计稿中的光照效果进行精细控制的场景，如摄影后期处理、电影特效制作等。",2,"2026-06-11 03:39:50","high_star"]