Text-to-Image
Diffusers
Safetensors
image-to-image
quantization
w4a4
svdquant
gptq
nunchaku
8-bit precision
Instructions to use ModelsLab/Qwen-Image-2.1-W4A4-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ModelsLab/Qwen-Image-2.1-W4A4-int4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ModelsLab/Qwen-Image-2.1-W4A4-int4", 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
| { | |
| "_class_name": "QwenImage21Transformer2DModel", | |
| "_diffusers_version": "0.41.0.dev0", | |
| "_name_or_path": "/workspace/hf/hub/models--Qwen--Qwen-Image-2.1/snapshots/790c92633540aa0cb11d9abf19eb46d861714758/transformer", | |
| "attention_head_dim": 128, | |
| "axes_dims_rope": [ | |
| 16, | |
| 56, | |
| 56 | |
| ], | |
| "causal_condition": true, | |
| "context_in_dim": 4096, | |
| "eps": 1e-06, | |
| "in_channels": 64, | |
| "mlp_ratio": 3, | |
| "num_attention_heads": 32, | |
| "num_layers": 32, | |
| "out_channels": 64, | |
| "patch_size": 1 | |
| } | |