--- title: Qwen Image 2.1 GGUF Studio emoji: 🎨 colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 6.28.0 python_version: "3.12" app_file: app.py short_description: Qwen Image 2.1 Uncensored GGUF demo with Q4_K_M weights startup_duration_timeout: 1h models: - abenzerps/Qwen-Image-2.1-Uncensored-GGUF - Qwen/Qwen-Image-2.1 --- # Qwen Image 2.1 GGUF Studio A Gradio demo of [abenzerps/Qwen-Image-2.1-Uncensored-GGUF](https://huggingface.co/abenzerps/Qwen-Image-2.1-Uncensored-GGUF), using its recommended **Q4_K_M** checkpoint on Hugging Face ZeroGPU. This replaces the original diffusion transformer in this Space. - **Create an image:** describe a scene or choose an example. - **Edit an image:** upload one reference image and describe the change. - **Transparent PNG:** describe a sticker, object, or other isolated asset. The model receives Qwen's recommended transparency prompt. Transparency depends on the generated result. - Five aspect ratios around 1 megapixel, adjustable steps, reproducible seeds, and downloadable PNGs with embedded generation settings. The default is the model card's recommended 40 inference steps; lower this for quicker previews. Example results are cached on first use. Disable **Use a new seed each time** to reproduce a result with the same settings. ## Hosting This Space requires `zero-a10g` hardware. Configure hardware in the Space settings; README metadata does not select hardware. No external inference API key is needed. Model and library revisions are pinned in the source. The initial download is approximately 24 GB and can take several minutes. The 4.60 GB `qwen-image-2.1-Q4_K_M.gguf` file is checked against the publisher's SHA256 checksum. All 297 tensors are loaded with strict key and shape validation. The GGUF values are expanded to BF16 once at startup so ZeroGPU can pack and stream ordinary PyTorch tensors; the model does not remain compressed in GPU memory. This trades the runtime memory saving for predictable inference latency within the 60-second GPU reservation. The compatible text encoder, VAE, processor, scheduler, and transformer configuration come from the pinned upstream `Qwen/Qwen-Image-2.1` repository. Its diffusion transformer weights are neither downloaded nor used as a fallback. The publisher describes the GGUF as a quantization of the original upstream weights, not a separately trained model. The Q8_0 variant is not used because the model card reports a shape-mismatch issue. Example caching uses a separate directory for this GGUF revision, preventing results from the previous model from being served. PNG metadata records the exact repository, revision, filename, checksum, and generation settings. The model loads at startup and is registered with ZeroGPU. The Gradio queue runs one generation at a time. Visitors use Hugging Face's daily ZeroGPU quota. Uploaded and generated files are temporary; download results you want to keep. The app does not send images to an external API or publish a community gallery. Gradio cached files expire after 24 hours; cached examples can be reused across visitors. ## API Use Gradio's **Use via API** link for the current `/generate` schema. An MCP server is also enabled. The handler returns the preview file, original PNG download, actual seed, and timing details. ## Model license The model is governed by the [Qwen Research License Agreement](https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE). See the model repository for its terms and intended use.