z-image-4bit / README.md
lpalbou's picture
Upload folder using huggingface_hub
79a2843 verified
---
license: apache-2.0
base_model: Tongyi-MAI/Z-Image
pipeline_tag: text-to-image
library_name: mlx-gen
tags:
- mlx
- mlx-gen
- mflux
- apple-silicon
- 4-bit
- z-image
---
# z-image-4bit
This repository contains MLX-Gen saved weights for `Tongyi-MAI/Z-Image`. The checkpoint is designed for local Apple Silicon inference with [`mlx-gen`](https://github.com/lpalbou/mlx-gen).
It uses the mflux/MLX saved-weight layout and MLX quantization tensors. It is not a Diffusers or Transformers `from_pretrained()` checkpoint.
## Source Model
Original model: [`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image).
## License and Access
This quantized derivative follows the Apache 2.0 license of the source model.
## Quantization
This is an MLX 4-bit checkpoint. Model-specific quantization predicates may keep unsupported layers unquantized or at a different precision. See the [MLX-Gen quantization docs](https://github.com/lpalbou/mlx-gen/blob/main/docs/quantization.md) for compatibility notes.
## Compatibility
Requires `mlx-gen >= 0.18.2`.
Generated with `mlx-gen 0.18.2`.
Use the `mlxgen` command and Python import path for new MLX-Gen projects.
## Usage
```bash
python -m pip install -U mlx-gen
mlxgen download --model AbstractFramework/z-image-4bit
mlxgen generate \
--model AbstractFramework/z-image-4bit \
--prompt "Your prompt here" \
--steps 50 \
--guidance 4 \
--seed 42 \
--output image.png
```
## Attribution
MLX-Gen is based on [mflux](https://github.com/filipstrand/mflux) by Filip Strand and the original mflux contributors. This model card is generated by MLX-Gen so derived checkpoints keep that attribution visible.
Quantized and contributed by [@lpalbou](https://huggingface.co/lpalbou).