mahdideveloepr commited on
Commit
cc8ef20
·
verified ·
1 Parent(s): 9451bf8

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -261
README.md DELETED
@@ -1,261 +0,0 @@
1
- # IC-Light
2
-
3
- IC-Light is a project to manipulate the illumination of images.
4
-
5
- The name "IC-Light" stands for **"Imposing Consistent Light"** (we will briefly describe this at the end of this page).
6
-
7
- Currently, we release two types of models: text-conditioned relighting model and background-conditioned model. Both types take foreground images as inputs.
8
-
9
- **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.**
10
-
11
- # News
12
-
13
- [Alternative model](https://github.com/lllyasviel/IC-Light/discussions/109) for stronger illumination modifications.
14
-
15
- Some news about flux is [here](https://github.com/lllyasviel/IC-Light/discussions/98). (A fix [update](https://github.com/lllyasviel/IC-Light/discussions/98#discussioncomment-11370266) is added at Nov 25, more demos will be uploaded soon.)
16
-
17
- # Get Started
18
-
19
- Below script will run the text-conditioned relighting model:
20
-
21
- git clone https://github.com/lllyasviel/IC-Light.git
22
- cd IC-Light
23
- conda create -n iclight python=3.10
24
- conda activate iclight
25
- pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
26
- pip install -r requirements.txt
27
- python gradio_demo.py
28
-
29
- Or, to use background-conditioned demo:
30
-
31
- python gradio_demo_bg.py
32
-
33
- Model downloading is automatic.
34
-
35
- Note that the "gradio_demo.py" has an official [huggingFace Space here](https://huggingface.co/spaces/lllyasviel/IC-Light).
36
-
37
- # Screenshot
38
-
39
- ### Text-Conditioned Model
40
-
41
- (Note that the "Lighting Preference" are just initial latents - eg., if the Lighting Preference is "Left" then initial latent is left white right black.)
42
-
43
- ---
44
-
45
- **Prompt: beautiful woman, detailed face, warm atmosphere, at home, bedroom**
46
-
47
- Lighting Preference: Left
48
-
49
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/87265483-aa26-4d2e-897d-b58892f5fdd7)
50
-
51
- ---
52
-
53
- **Prompt: beautiful woman, detailed face, sunshine from window**
54
-
55
- Lighting Preference: Left
56
-
57
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/148c4a6d-82e7-4e3a-bf44-5c9a24538afc)
58
-
59
- ---
60
-
61
- **beautiful woman, detailed face, neon, Wong Kar-wai, warm**
62
-
63
- Lighting Preference: Left
64
-
65
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/f53c9de2-534a-42f4-8272-6d16a021fc01)
66
-
67
- ---
68
-
69
- **Prompt: beautiful woman, detailed face, sunshine, outdoor, warm atmosphere**
70
-
71
- Lighting Preference: Right
72
-
73
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/25d6ea24-a736-4a0b-b42d-700fe8b2101e)
74
-
75
- ---
76
-
77
- **Prompt: beautiful woman, detailed face, sunshine, outdoor, warm atmosphere**
78
-
79
- Lighting Preference: Left
80
-
81
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/dd30387b-0490-46ee-b688-2191fb752e68)
82
-
83
- ---
84
-
85
- **Prompt: beautiful woman, detailed face, sunshine from window**
86
-
87
- Lighting Preference: Right
88
-
89
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/6c9511ca-f97f-401a-85f3-92b4442000e3)
90
-
91
- ---
92
-
93
- **Prompt: beautiful woman, detailed face, shadow from window**
94
-
95
- Lighting Preference: Left
96
-
97
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/e73701d5-890e-4b15-91ee-97f16ea3c450)
98
-
99
- ---
100
-
101
- **Prompt: beautiful woman, detailed face, sunset over sea**
102
-
103
- Lighting Preference: Right
104
-
105
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/ff26ac3d-1b12-4447-b51f-73f7a5122a05)
106
-
107
- ---
108
-
109
- **Prompt: handsome boy, detailed face, neon light, city**
110
-
111
- Lighting Preference: Left
112
-
113
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/d7795e02-46f7-444f-93e7-4d6460840437)
114
-
115
- ---
116
-
117
- **Prompt: beautiful woman, detailed face, light and shadow**
118
-
119
- Lighting Preference: Left
120
-
121
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/706f70a8-d1a0-4e0b-b3ac-804e8e231c0f)
122
-
123
- (beautiful woman, detailed face, soft studio lighting)
124
-
125
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/fe0a72df-69d4-4e11-b661-fb8b84d0274d)
126
-
127
- ---
128
-
129
- **Prompt: Buddha, detailed face, sci-fi RGB glowing, cyberpunk**
130
-
131
- Lighting Preference: Left
132
-
133
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/68d60c68-ce23-4902-939e-11629ccaf39a)
134
-
135
- ---
136
-
137
- **Prompt: Buddha, detailed face, natural lighting**
138
-
139
- Lighting Preference: Left
140
-
141
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/1841d23d-0a0d-420b-a5ab-302da9c47c17)
142
-
143
- ---
144
-
145
- **Prompt: toy, detailed face, shadow from window**
146
-
147
- Lighting Preference: Bottom
148
-
149
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/dcb97439-ea6b-483e-8e68-cf5d320368c7)
150
-
151
- ---
152
-
153
- **Prompt: toy, detailed face, sunset over sea**
154
-
155
- Lighting Preference: Right
156
-
157
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/4f78b897-621d-4527-afa7-78d62c576100)
158
-
159
- ---
160
-
161
- **Prompt: dog, magic lit, sci-fi RGB glowing, studio lighting**
162
-
163
- Lighting Preference: Bottom
164
-
165
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/1db9cac9-8d3f-4f40-82e2-e3b0cafd8613)
166
-
167
- ---
168
-
169
- **Prompt: mysteriou human, warm atmosphere, warm atmosphere, at home, bedroom**
170
-
171
- Lighting Preference: Right
172
-
173
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/5d5aa7e5-8cbd-4e1f-9f27-2ecc3c30563a)
174
-
175
- ---
176
-
177
- ### Background-Conditioned Model
178
-
179
- The background conditioned model does not require careful prompting. One can just use simple prompts like "handsome man, cinematic lighting".
180
-
181
- ---
182
-
183
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/0b2a889f-682b-4393-b1ec-2cabaa182010)
184
-
185
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/477ca348-bd47-46ff-81e6-0ffc3d05feb2)
186
-
187
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/5bc9d8d9-02cd-442e-a75c-193f115f2ad8)
188
-
189
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/a35e4c57-e199-40e2-893b-cb1c549612a9)
190
-
191
- ---
192
-
193
- A more structured visualization:
194
-
195
- ![r1](https://github.com/lllyasviel/IC-Light/assets/19834515/c1daafb5-ac8b-461c-bff2-899e4c671ba3)
196
-
197
- # Imposing Consistent Light
198
-
199
- In HDR space, illumination has a property that all light transports are independent.
200
-
201
- As a result, the blending of appearances of different light sources is equivalent to the appearance with mixed light sources:
202
-
203
- ![cons](https://github.com/lllyasviel/IC-Light/assets/19834515/27c67787-998e-469f-862f-047344e100cd)
204
-
205
- Using the above [light stage](https://www.pauldebevec.com/Research/LS/) as an example, the two images from the "appearance mixture" and "light source mixture" are consistent (mathematically equivalent in HDR space, ideally).
206
-
207
- We imposed such consistency (using MLPs in latent space) when training the relighting models.
208
-
209
- As 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.
210
-
211
- ![r2](https://github.com/lllyasviel/IC-Light/assets/19834515/25068f6a-f945-4929-a3d6-e8a152472223)
212
-
213
- From 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.
214
-
215
- You can reproduce this experiment using this button (it is 4x slower because it relight image 4 times)
216
-
217
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/d9c37bf7-2136-446c-a9a5-5a341e4906de)
218
-
219
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/fcf5dd55-0309-4e8e-9721-d55931ea77f0)
220
-
221
- Below are bigger images (feel free to try yourself to get more results!)
222
-
223
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/12335218-186b-4c61-b43a-79aea9df8b21)
224
-
225
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/2daab276-fdfa-4b0c-abcb-e591f575598a)
226
-
227
- For reference, [geowizard](https://fuxiao0719.github.io/projects/geowizard/) (geowizard is a really great work!):
228
-
229
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/4ba1a96d-e218-42ab-83ae-a7918d56ee5f)
230
-
231
- And, [switchlight](https://arxiv.org/pdf/2402.18848) (switchlight is another great work!):
232
-
233
- ![image](https://github.com/lllyasviel/IC-Light/assets/19834515/fbdd961f-0b26-45d2-802e-ffd734affab8)
234
-
235
- # Model Notes
236
-
237
- * **iclight_sd15_fc.safetensors** - The default relighting model, conditioned on text and foreground. You can use initial latent to influence the relighting.
238
-
239
- * **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.
240
-
241
- * **iclight_sd15_fbc.safetensors** - Relighting model conditioned with text, foreground, and background.
242
-
243
- Also, note that the original [BRIA RMBG 1.4](https://huggingface.co/briaai/RMBG-1.4) is for non-commercial use. If you use IC-Light in commercial projects, replace it with other background replacer like [BiRefNet](https://github.com/ZhengPeng7/BiRefNet).
244
-
245
- # Cite
246
-
247
- @Misc{iclight,
248
- author = {Lvmin Zhang and Anyi Rao and Maneesh Agrawala},
249
- title = {IC-Light GitHub Page},
250
- year = {2024},
251
- }
252
-
253
- # Related Work
254
-
255
- Also read ...
256
-
257
- [Total Relighting: Learning to Relight Portraits for Background Replacement](https://augmentedperception.github.io/total_relighting/)
258
-
259
- [Relightful Harmonization: Lighting-aware Portrait Background Replacement](https://arxiv.org/abs/2312.06886)
260
-
261
- [SwitchLight: Co-design of Physics-driven Architecture and Pre-training Framework for Human Portrait Relighting](https://arxiv.org/pdf/2402.18848)