Qwen-Image-Layered (6-bit Quantized for MFLUX)
6-bit quantized version of Qwen/Qwen-Image-Layered optimized for Apple Silicon via MFLUX.
| Version | Size | VRAM |
|---|---|---|
| BF16 (original) | ~55 GB | ~55 GB |
| 6-bit (this) | ~31 GB | ~29 GB |
What is Qwen-Image-Layered?
Qwen-Image-Layered decomposes any image into multiple RGBA layers with transparency. Each layer can be independently edited, moved, resized, or recolored—enabling high-fidelity, consistent image editing.
Quick Start
Installation
Requires MFLUX with Qwen-Image-Layered support (PR #302):
# Install from the PR
git clone https://github.com/zimengxiong/mflux.git
cd mflux
uv sync
Usage
uv run flux-generate-qwen-layered \
--image input.png \
--layers 4 \
--steps 50 \
-q 6 \
--output-dir ./layers
Output: 4 RGBA PNG files (layer_0.png, layer_1.png, etc.) with transparency.
Parameters
| Parameter | Description | Default |
|---|---|---|
--image |
Input image path | Required |
--layers |
Number of layers to decompose | 4 |
--steps |
Inference steps | 50 |
-q |
Quantization (4, 6, or 8-bit) | None (BF16) |
--resolution |
Resolution bucket (640 or 1024) | 640 |
--output-dir |
Output directory for layers | ./ |
Example
Input image:
Model Architecture
- Transformer: QwenImageTransformer2DModel with Layer3D RoPE (3D positional encoding for
[layer, height, width]) - VAE: AutoencoderKLQwenImage (RGBA 4-channel with 3D temporal convolutions)
- Text Encoder: Qwen2.5-VL for conditioning
Hardware Requirements
- Apple Silicon Mac (M1/M2/M3/M4 series)
- Minimum 24GB unified memory (32GB+ recommended)
- macOS 13.0+
Links
- 📦 MFLUX - Fast MLX inference for Apple Silicon
- 🤗 Original Model - Full BF16 weights
- 📑 Paper - Research paper
- 📑 Blog - Official blog post
License
Apache 2.0 (same as original model)
Citation
@misc{yin2025qwenimagelayered,
title={Qwen-Image-Layered: Towards Inherent Editability via Layer Decomposition},
author={Shengming Yin, Zekai Zhang, Zecheng Tang, Kaiyuan Gao, Xiao Xu, Kun Yan, Jiahao Li, Yilei Chen, Yuxiang Chen, Heung-Yeung Shum, Lionel M. Ni, Jingren Zhou, Junyang Lin, Chenfei Wu},
year={2025},
eprint={2512.15603},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2512.15603},
}