Instructions to use ISLAM-PO/Glitch-Img-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ISLAM-PO/Glitch-Img-1.0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ISLAM-PO/Glitch-Img-1.0", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Notice โ Modified re-upload: This repository is
ISLAM-PO/Glitch-Img-1.0, a renamed re-upload based onQwen/Qwen-Image-2.1. Modified files:README.md(renaming, repo-ID updates, attribution notes). All model weights and configs are unchanged from the original. Built with Qwen. Original work remains under the Qwen Research License Agreement, non-commercial use only. SeeNOTICEfor required attribution.
๐ค ModelScope | ๐ค HuggingFace | ๐ Blog | ๐ฅ๏ธ Demo | ๐ซจ Discord | ๐ฌ WeChat
Introduction
We are excited to publish Glitch-Img-1.0, a renamed re-upload based on Qwen-Image-2.1, a unified text-to-image generation and image editing model in the Qwen family. Built with Qwen. Base model: Qwen/Qwen-Image-2.1. With just 7B parameters in its visual generation component (32 Single-Stream DiT layers), Glitch-Img-1.0 balances generation quality, inference efficiency, and versatility.
Four key improvements define this release:
- Compact and Efficient โ A lightweight architecture with mixed-granularity attention and prefix KV cache reuse delivers strong image quality at low computational cost.
- Native Transparency, Unified Creation and Editing โ Generate regular or transparent (RGBA) images from text, edit transparent layers, and extract subjects from photographsโall in one model.
- Versatile Editing โ Support up to 10 reference images, specify local edits via circles, painted annotations, or separate masks, and preserve identity for people and products.
- Realistic Textures and Refined Aesthetics โ Improved typography, portrait lighting, and fine details for more visually compelling results.
For more details, see the GitHub repo and Blog.
Quick Start
Installation
pip install torch>=2.4.0
pip install transformers>=5.17
pip install git+https://github.com/huggingface/diffusers
pip install accelerate pillow
Text-to-Image
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"ISLAM-PO/Glitch-Img-1.0", torch_dtype=torch.bfloat16
).to("cuda")
image = pipe(
prompt="A neon shop sign that reads \"GLITCH IMG 1.0\", rainy night, reflections on wet pavement",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("t2i_example.png")
Image Editing
import torch
from PIL import Image
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"ISLAM-PO/Glitch-Img-1.0", torch_dtype=torch.bfloat16
).to("cuda")
input_image = Image.open("input.png")
image = pipe(
prompt="Change the background to a sunset beach",
image=input_image,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("edit_example.png")
Transparent Image Generation (RGBA)
Use the recommended prompt format for transparent images:
image = pipe(
prompt="This is an RGBA image with transparency. A cute cartoon dragon sticker. The image has alpha channel and the background is transparent.",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("transparent_example.png")
Supported Aspect Ratios
aspect_ratios = {
"1:1": (2048, 2048),
"4:3": (2400, 1792),
"3:4": (1792, 2400),
"3:2": (2528, 1696),
"2:3": (1696, 2528),
"16:9": (2752, 1536),
"9:16": (1536, 2752),
}
Memory Optimization
pipe = QwenImage21Pipeline.from_pretrained(
"ISLAM-PO/Glitch-Img-1.0", torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
Showcase
Native transparent image generation
Group photograph generated from six portrait references
Text rendering
License
This model is licensed under the Qwen Research License Agreement. Non-commercial use only.
Attribution: Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved. This re-upload (ISLAM-PO/Glitch-Img-1.0) is Built with Qwen and based on Qwen/Qwen-Image-2.1. For commercial use, request a license at model-business@notice.qwencloud.com.
- Downloads last month
- 53
Model tree for ISLAM-PO/Glitch-Img-1.0
Base model
Qwen/Qwen-Image-2.1