Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -236,19 +236,19 @@ def infer(
|
|
| 236 |
|
| 237 |
|
| 238 |
# --- UI ---
|
| 239 |
-
css = '''#col-container { max-width:
|
| 240 |
.dark .progress-text{color: white !important}
|
| 241 |
-
#examples{max-width:
|
| 242 |
|
| 243 |
with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
| 244 |
with gr.Column(elem_id="col-container"):
|
| 245 |
-
gr.Markdown("## Qwen Image Edit — Fusion")
|
| 246 |
gr.Markdown(""" Qwen Image Edit 2509 ✨ Using [dx8152's Qwen-Image-Edit-2509 Fusion LoRA](https://huggingface.co/dx8152/Qwen-Image-Edit-2509-Fusion) and [lightx2v Qwen-Image-Lightning LoRA]() for 4-step inference 💨 """ )
|
| 247 |
with gr.Row():
|
| 248 |
with gr.Column():
|
| 249 |
with gr.Row():
|
| 250 |
gallery = gr.Gallery(
|
| 251 |
-
label="
|
| 252 |
columns=3, rows=2, height="auto", type="pil"
|
| 253 |
)
|
| 254 |
image_background = gr.Image(label="Background Image", type="pil", visible=True)
|
|
@@ -266,17 +266,20 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 266 |
with gr.Column():
|
| 267 |
result = gr.ImageSlider(label="Output Image", interactive=False)
|
| 268 |
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
|
|
|
|
|
|
|
|
|
| 280 |
|
| 281 |
inputs = [gallery, image_background, prompt, seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width]
|
| 282 |
outputs = [result, seed]
|
|
|
|
| 236 |
|
| 237 |
|
| 238 |
# --- UI ---
|
| 239 |
+
css = '''#col-container { max-width: 100px; margin: 0 auto; }
|
| 240 |
.dark .progress-text{color: white !important}
|
| 241 |
+
#examples{max-width: 100px; margin: 0 auto; }'''
|
| 242 |
|
| 243 |
with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
| 244 |
with gr.Column(elem_id="col-container"):
|
| 245 |
+
gr.Markdown("## Qwen Image Edit — Product Fusion")
|
| 246 |
gr.Markdown(""" Qwen Image Edit 2509 ✨ Using [dx8152's Qwen-Image-Edit-2509 Fusion LoRA](https://huggingface.co/dx8152/Qwen-Image-Edit-2509-Fusion) and [lightx2v Qwen-Image-Lightning LoRA]() for 4-step inference 💨 """ )
|
| 247 |
with gr.Row():
|
| 248 |
with gr.Column():
|
| 249 |
with gr.Row():
|
| 250 |
gallery = gr.Gallery(
|
| 251 |
+
label="Product image (background auto removed)",
|
| 252 |
columns=3, rows=2, height="auto", type="pil"
|
| 253 |
)
|
| 254 |
image_background = gr.Image(label="Background Image", type="pil", visible=True)
|
|
|
|
| 266 |
with gr.Column():
|
| 267 |
result = gr.ImageSlider(label="Output Image", interactive=False)
|
| 268 |
|
| 269 |
+
gr.Examples(
|
| 270 |
+
examples=[
|
| 271 |
+
[["product.png"], "wednesday.png", "put the product in her hand"],
|
| 272 |
+
[[], "fusion_car.png", ""],
|
| 273 |
+
[["product_2.png"], "background_2.png", ""],
|
| 274 |
+
[[], "fusion_shoes.png", ""],
|
| 275 |
+
[["product_3.png"], "background_3.png", ""],
|
| 276 |
+
],
|
| 277 |
+
inputs=[gallery, image_background, prompt],
|
| 278 |
+
outputs=[result, seed],
|
| 279 |
+
fn=infer,
|
| 280 |
+
cache_examples="lazy",
|
| 281 |
+
elem_id="examples"
|
| 282 |
+
)
|
| 283 |
|
| 284 |
inputs = [gallery, image_background, prompt, seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width]
|
| 285 |
outputs = [result, seed]
|