Spaces:
Running
on
Zero
Running
on
Zero
Add demo (#1)
Browse files- Light Migration (a48057738cda45c1fb302b9ed173cecee7dd9f3c)
- Upload 9 files (990781e7e528f354181b3e6578d63f41b9ccbb31)
- Update app.py (6d5a903bce9186c3336f45e9a313b09b101c2f17)
- .gitattributes +8 -0
- app.py +26 -3
- character_1.png +3 -0
- character_2.png +3 -0
- light_1.png +3 -0
- light_2.png +3 -0
- light_3.jpeg +0 -0
- light_4.png +3 -0
- light_5.png +3 -0
- light_6.png +3 -0
- place_1.png +3 -0
.gitattributes
CHANGED
|
@@ -38,3 +38,11 @@ grumpy.png filter=lfs diff=lfs merge=lfs -text
|
|
| 38 |
wednesday.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
monkey.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
tool_of_the_sea.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
wednesday.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
monkey.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
tool_of_the_sea.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
character_1.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
character_2.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
light_1.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
light_2.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
light_4.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
light_5.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
light_6.png filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
place_1.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
|
@@ -201,7 +201,6 @@ with gr.Blocks() as demo:
|
|
| 201 |
gr.Markdown("## 💡 Qwen Image Edit — Light Migration")
|
| 202 |
gr.Markdown("""
|
| 203 |
Transfer lighting and color tones from a reference image to your source image ✨
|
| 204 |
-
|
| 205 |
Using [dx8152's Qwen-Edit-2509-Light-Migration LoRA](https://huggingface.co/dx8152/Qwen-Edit-2509-Light-Migration)
|
| 206 |
and [Phr00t/Qwen-Image-Edit-Rapid-AIO](https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/tree/main) for 4-step inference 💨
|
| 207 |
""")
|
|
@@ -271,8 +270,32 @@ with gr.Blocks() as demo:
|
|
| 271 |
|
| 272 |
with gr.Column():
|
| 273 |
result = gr.Image(label="Output Image", interactive=False)
|
| 274 |
-
output_seed = gr.Number(label="Seed Used", interactive=False)
|
| 275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
inputs = [
|
| 277 |
image, light_source, prompt,
|
| 278 |
seed, randomize_seed, true_guidance_scale,
|
|
|
|
| 201 |
gr.Markdown("## 💡 Qwen Image Edit — Light Migration")
|
| 202 |
gr.Markdown("""
|
| 203 |
Transfer lighting and color tones from a reference image to your source image ✨
|
|
|
|
| 204 |
Using [dx8152's Qwen-Edit-2509-Light-Migration LoRA](https://huggingface.co/dx8152/Qwen-Edit-2509-Light-Migration)
|
| 205 |
and [Phr00t/Qwen-Image-Edit-Rapid-AIO](https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/tree/main) for 4-step inference 💨
|
| 206 |
""")
|
|
|
|
| 270 |
|
| 271 |
with gr.Column():
|
| 272 |
result = gr.Image(label="Output Image", interactive=False)
|
| 273 |
+
output_seed = gr.Number(label="Seed Used", interactive=False, visible=False)
|
| 274 |
+
|
| 275 |
+
gr.Examples(
|
| 276 |
+
examples=[
|
| 277 |
+
# Character 1 with 3 different lights
|
| 278 |
+
["character_1.png", "light_1.png"],
|
| 279 |
+
["character_1.png", "light_3.jpeg"],
|
| 280 |
+
["character_1.png", "light_5.png"],
|
| 281 |
+
# Character 2 with 3 different lights
|
| 282 |
+
["character_2.png", "light_2.png"],
|
| 283 |
+
["character_2.png", "light_4.png"],
|
| 284 |
+
["character_2.png", "light_6.png"],
|
| 285 |
+
# Place 1 with 3 different lights
|
| 286 |
+
["place_1.png", "light_1.png"],
|
| 287 |
+
["place_1.png", "light_4.png"],
|
| 288 |
+
["place_1.png", "light_6.png"],
|
| 289 |
+
],
|
| 290 |
+
inputs=[
|
| 291 |
+
image, light_source
|
| 292 |
+
],
|
| 293 |
+
outputs=outputs,
|
| 294 |
+
fn=infer_light_migration,
|
| 295 |
+
cache_examples=True,
|
| 296 |
+
cache_mode="lazy",
|
| 297 |
+
elem_id="examples"
|
| 298 |
+
)
|
| 299 |
inputs = [
|
| 300 |
image, light_source, prompt,
|
| 301 |
seed, randomize_seed, true_guidance_scale,
|
character_1.png
ADDED
|
Git LFS Details
|
character_2.png
ADDED
|
Git LFS Details
|
light_1.png
ADDED
|
Git LFS Details
|
light_2.png
ADDED
|
Git LFS Details
|
light_3.jpeg
ADDED
|
light_4.png
ADDED
|
Git LFS Details
|
light_5.png
ADDED
|
Git LFS Details
|
light_6.png
ADDED
|
Git LFS Details
|
place_1.png
ADDED
|
Git LFS Details
|