Spaces:
Running on Zero
A newer version of the Gradio SDK is available: 6.22.0
Agent guidance
Project
This repository is a Hugging Face Gradio Space for image editing with:
Qwen/Qwen-Image-Edit-2511- a four-step Rapid-AIO transformer
- a custom Qwen pipeline under
qwenimage/ - optional FA3 attention acceleration
The base model, accelerated transformer, and Diffusers dependency are pinned to exact revisions. Update those pins deliberately and test the deployed Space before merging.
The transformer and text encoder are dynamically quantized to FP8 before the pipeline is moved to its runtime device. Keep that ordering: the unquantized BF16 pipeline is too large for the ZeroGPU transfer path.
Keep output sizing automatic and preserve the minimum input-side validation. Exposing low output dimensions or accepting thumbnail-sized sources can produce tiled/grid-like artifacts that look like a model failure.
Privacy boundary
Image inference runs inside the Space. Do not add application code that sends prompts, input images, generated images, or generation parameters to another service without explicit user consent and prominent UI/README disclosure.
Do not print prompt text or image contents to application logs. Let Gradio
manage temporary files and keep delete_cache enabled. The pinned model
repositories are public; do not add an account token or other Space secret
without a documented requirement and least-privilege review.
Model-loading boundary
The four-step UI must use the matching accelerated transformer. Do not silently fall back to the standard Qwen transformer while retaining a four-step default; that produces broken or misleading output. A clear startup failure is safer than silently changing model behavior.
Validation
Before deployment:
python3 -m compileall -q .
git diff --check
After deployment, verify:
- the Space reaches
RUNNING - a harmless synthetic edit succeeds
- prompts do not appear in application logs
- no unexpected application-level outbound upload paths exist
The Space uses ZeroGPU and requires Hugging Face infrastructure for model downloads, builds, uploads, and inference hosting.