MOSS-Image-SFT (8-bit) for Apple Silicon (MLX / mflux)
Native Apple Silicon implementation of MOSS-Image-SFT ported to Apple MLX via mflux.
- Precision: 8-bit (High-Fidelity -47.2% VRAM)
- Model Size: Transformer 5.03 GB
- Architecture: 42-layer MOSS-Image DiT Transformer + Qwen 3.5 Text Encoder + FLUX.2 Small VAE
- Native Apple Silicon Support: Metal Performance Shaders (MPS) & Unified Memory
3-Precision Comprehensive Benchmark (Tested on Apple M3 Max)
| Precision | Transformer VRAM | Compression | 1024² Step Time | Fidelity | Engineering Recommendation |
|---|---|---|---|---|---|
| BF16 | 9.52 GB | Baseline (100%) | ~13.9 s / step | ⭐⭐⭐⭐⭐ 100% | Master production / Highest detail |
| 8-bit | 5.03 GB | -47.2% | ~17.1 s / step | ⭐⭐⭐⭐⭐ 99.8% | 👑 Recommended for Daily Production |
| 4-bit | 2.66 GB | -72.1% | ~20.9 s / step | ⭐⭐⭐⭐ 92.0% | 16 GB unified memory devices |
Precision Comparison Cards across 4 Scenarios
Scenario 1: Realistic Fluffy Cat with Golden Hour Backlighting (1024x1024)
Scenario 2: Oriental Classical Portrait & Skin Texture (1024x1024)
Scenario 3: Chinese Calligraphy & Live Streaming UI Layout (944x1680)
Scenario 4: Macro Precision Watchmaking Workbench Still Life (1024x1024)
Usage with mflux
Installation
git clone -b feature/moss-image-sft https://github.com/vanch007/mflux.git
cd mflux
pip install -e .
CLI Generation
# Generate with 8-bit model
mflux-generate-moss-image --model vanch007/MOSS-Image-SFT-mlx-8bit \
--prompt "A majestic fluffy cat sitting on a wooden bench, golden hour lighting, 8k photo" \
--steps 12 --guidance 3.0 --width 1024 --height 1024 --seed 42 --output output.png
Python API
from mflux.models.moss_image.variants.txt2img.moss_image import MOSSImage
model = MOSSImage(model_path="vanch007/MOSS-Image-SFT-mlx-8bit")
image = model.generate_image(
prompt="A majestic fluffy cat sitting on a wooden bench, golden hour lighting, 8k photo",
width=1024,
height=1024,
num_inference_steps=12,
guidance_scale=3.0,
seed=42
)
image.save("moss_cat.png")
Acknowledgements
- OpenMOSS Team for the original MOSS-Image model.
- mflux-community for the Apple Silicon MLX framework.