Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -275,8 +275,25 @@ def infer(
|
|
| 275 |
progress=gr.Progress(track_tqdm=True),
|
| 276 |
):
|
| 277 |
"""
|
| 278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
"""
|
|
|
|
| 280 |
# Hardcode the negative prompt as requested
|
| 281 |
negative_prompt = " "
|
| 282 |
|
|
@@ -454,4 +471,4 @@ with gr.Blocks(css=css) as demo:
|
|
| 454 |
)
|
| 455 |
|
| 456 |
if __name__ == "__main__":
|
| 457 |
-
demo.launch()
|
|
|
|
| 275 |
progress=gr.Progress(track_tqdm=True),
|
| 276 |
):
|
| 277 |
"""
|
| 278 |
+
Run image-editing inference using the Qwen-Image-Edit pipeline.
|
| 279 |
+
|
| 280 |
+
Parameters:
|
| 281 |
+
images (list): Input images from the Gradio gallery (PIL or path-based).
|
| 282 |
+
prompt (str): Editing instruction (may be rewritten by LLM if enabled).
|
| 283 |
+
seed (int): Random seed for reproducibility.
|
| 284 |
+
randomize_seed (bool): If True, overrides seed with a random value.
|
| 285 |
+
true_guidance_scale (float): CFG scale used by Qwen-Image.
|
| 286 |
+
num_inference_steps (int): Number of diffusion steps.
|
| 287 |
+
height (int | None): Optional output height override.
|
| 288 |
+
width (int | None): Optional output width override.
|
| 289 |
+
rewrite_prompt (bool): Whether to rewrite the prompt using Qwen-2.5-VL.
|
| 290 |
+
num_images_per_prompt (int): Number of images to generate.
|
| 291 |
+
progress: Gradio progress callback.
|
| 292 |
+
|
| 293 |
+
Returns:
|
| 294 |
+
tuple: (generated_images, seed_used, UI_visibility_update)
|
| 295 |
"""
|
| 296 |
+
|
| 297 |
# Hardcode the negative prompt as requested
|
| 298 |
negative_prompt = " "
|
| 299 |
|
|
|
|
| 471 |
)
|
| 472 |
|
| 473 |
if __name__ == "__main__":
|
| 474 |
+
demo.launch(mcp_server=True)
|