Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -401,7 +401,7 @@ def infer(
|
|
401 |
# Generate the image with outpainting preprocessing
|
402 |
result_image = pipe(
|
403 |
outpaint_image, # Use the preprocessed image with white margins
|
404 |
-
prompt=prompt,
|
405 |
negative_prompt=negative_prompt,
|
406 |
num_inference_steps=num_inference_steps,
|
407 |
generator=generator,
|
@@ -439,20 +439,26 @@ with gr.Blocks(css=css) as demo:
|
|
439 |
gr.HTML("""
|
440 |
<div id="logo-title">
|
441 |
<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;">
|
|
|
442 |
</div>
|
443 |
""")
|
444 |
-
gr.Markdown("""
|
445 |
-
|
446 |
-
|
|
|
|
|
|
|
447 |
""")
|
448 |
|
|
|
449 |
with gr.Row():
|
450 |
with gr.Column():
|
451 |
input_image = gr.Image(label="Input Image", type="pil")
|
452 |
|
453 |
prompt = gr.Text(
|
454 |
label="Prompt",
|
455 |
-
|
|
|
456 |
container=False,
|
457 |
)
|
458 |
|
|
|
401 |
# Generate the image with outpainting preprocessing
|
402 |
result_image = pipe(
|
403 |
outpaint_image, # Use the preprocessed image with white margins
|
404 |
+
prompt="replace the white margins. "+ prompt,
|
405 |
negative_prompt=negative_prompt,
|
406 |
num_inference_steps=num_inference_steps,
|
407 |
generator=generator,
|
|
|
439 |
gr.HTML("""
|
440 |
<div id="logo-title">
|
441 |
<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;">
|
442 |
+
<h2 style="font-style: italic;color: #5b47d1;margin-top: -27px !important;margin-left: 133px;">Outpaint [Fast]</h2>
|
443 |
</div>
|
444 |
""")
|
445 |
+
gr.Markdown("""
|
446 |
+
|
447 |
+
Outpaint images with Qwen Image Edit. [Learn more](https://github.com/QwenLM/Qwen-Image) about the Qwen-Image series.
|
448 |
+
|
449 |
+
This demo uses the [Qwen-Image-Lightning](https://huggingface.co/lightx2v/Qwen-Image-Lightning) LoRA with AoT compilation and FA3 for accelerated 8-step inference.
|
450 |
+
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.
|
451 |
""")
|
452 |
|
453 |
+
|
454 |
with gr.Row():
|
455 |
with gr.Column():
|
456 |
input_image = gr.Image(label="Input Image", type="pil")
|
457 |
|
458 |
prompt = gr.Text(
|
459 |
label="Prompt",
|
460 |
+
info="Describe what should appear in the extended areas",
|
461 |
+
placeholder="extend the image naturally",
|
462 |
container=False,
|
463 |
)
|
464 |
|