Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -386,12 +386,12 @@ with gr.Blocks(css=css) as demo:
|
|
386 |
gr.HTML("""
|
387 |
<div id="logo-title">
|
388 |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/qwen_image_edit_logo.png" alt="Qwen-Image Edit Logo" width="400" style="display: block; margin: 0 auto;">
|
389 |
-
<h2 style="font-style: italic;color: #5b47d1;margin-top: -27px !important;margin-left: 133px;">
|
390 |
</div>
|
391 |
""")
|
392 |
gr.Markdown("""
|
393 |
[Learn more](https://github.com/QwenLM/Qwen-Image) about the Qwen-Image series.
|
394 |
-
This demo uses the [Qwen-Image-Lightning](https://huggingface.co/lightx2v/Qwen-Image-Lightning) LoRA for accelerated inference.
|
395 |
Try on [Qwen Chat](https://chat.qwen.ai/), or [download model](https://huggingface.co/Qwen/Qwen-Image-Edit) to run locally with ComfyUI or diffusers.
|
396 |
""")
|
397 |
|
@@ -467,7 +467,24 @@ with gr.Blocks(css=css) as demo:
|
|
467 |
value=True
|
468 |
)
|
469 |
|
470 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
# update prompt when dropdown changes
|
472 |
illumination_dropdown.change(
|
473 |
fn=update_prompt_from_dropdown,
|
|
|
386 |
gr.HTML("""
|
387 |
<div id="logo-title">
|
388 |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/qwen_image_edit_logo.png" alt="Qwen-Image Edit Logo" width="400" style="display: block; margin: 0 auto;">
|
389 |
+
<h2 style="font-style: italic;color: #5b47d1;margin-top: -27px !important;margin-left: 133px;">Relight</h2>
|
390 |
</div>
|
391 |
""")
|
392 |
gr.Markdown("""
|
393 |
[Learn more](https://github.com/QwenLM/Qwen-Image) about the Qwen-Image series.
|
394 |
+
This demo uses the [Qwen-Image-Lightning](https://huggingface.co/lightx2v/Qwen-Image-Lightning) LoRA for accelerated 8-step inference.
|
395 |
Try on [Qwen Chat](https://chat.qwen.ai/), or [download model](https://huggingface.co/Qwen/Qwen-Image-Edit) to run locally with ComfyUI or diffusers.
|
396 |
""")
|
397 |
|
|
|
467 |
value=True
|
468 |
)
|
469 |
|
470 |
+
|
471 |
+
gr.Examples(
|
472 |
+
examples=[
|
473 |
+
["./assets/pexels-creationhill-1681010.jpg", "Add multiple colored light sources from lanterns. Create warm festival lighting. Set varied color temperatures. Add bokeh effects.", "colorful lantern light at festival", "auto"],
|
474 |
+
["./assets/pexels-creationhill-1681010.jpg", "add futuristic RGB lighting with electric blues, hot pinks, and neon greens creating a high-tech atmosphere with dramatic color separation and glowing effects", "sci-fi RGB glowing, cyberpunk", "left side"],
|
475 |
+
["./assets/pexels-moose-photos-170195-1587009.jpg", "Set blue-green color temperature. Add volumetric lighting effects. Reduce red channel significantly. Create particle effects in light beams. Add caustic light patterns.", "underwater glow, deep sea", "top"],
|
476 |
+
["./assets/pexels-moose-photos-170195-1587009.jpg", "Replace lighting with red sources. Add flashing strobing effects. Increase contrast. Create harsh shadows. Set monochromatic red color scheme.", "red glow, emergency lights", "right side"],
|
477 |
+
["./assets/pexels-simon-robben-55958-614810.jpg", "Add directional sunlight from window source. Increase brightness on lit areas. Create hard shadows with sharp edges. Set warm white color temperature. Add visible light rays and dust particles in beams.", "sunshine from window", "top right"],
|
478 |
+
["./assets/pexels-simon-robben-55958-614810.jpg", "add vibrant neon lights in electric blues, magentas, and greens casting colorful reflections on surfaces, creating a cyberpunk urban atmosphere with dramatic color contrasts", "neon night, city", "top left"],
|
479 |
+
["./assets/pexels-freestockpro-1227513.jpg", "warm lighting with soft purple and pink color grading", "purple and pink hues at twilight", "auto"],
|
480 |
+
["./assets/pexels-pixabay-158827.jpg", "Soft fog effects with reduced contrast throughout", "foggy morning, muted light", "auto"],
|
481 |
+
["./assets/pexels-pixabay-355465.jpg", "daylight, bright sunshine", "custom", "auto" ]
|
482 |
+
],
|
483 |
+
inputs=[input_image, prompt, illumination_dropdown, direction_dropdown],
|
484 |
+
outputs=[result, seed, final_prompt],
|
485 |
+
fn=infer,
|
486 |
+
cache_examples="lazy"
|
487 |
+
)
|
488 |
# update prompt when dropdown changes
|
489 |
illumination_dropdown.change(
|
490 |
fn=update_prompt_from_dropdown,
|