π¨ Native AI image generation for Apple Silicon with Qwen-Image. Lightning LoRA acceleration for fast 4β8 step runs. Zero Docker, just works.
24
stars
35
commits
Python
primary language
Sep 15, 2025
updated
Fast AI image generation for Apple Silicon. Native CLI with MPS acceleration or containerized with Cog. Lightning LoRA for 4β8 step generation.
Choose your approach:
git clone https://github.com/zsxkib/qwen-image-macos.git
cd qwen-image-macos
pip install -r requirements.txt
python qwen.py generate "cyberpunk cityscape" --ultra-fast
git clone https://github.com/zsxkib/qwen-image-macos.git
cd qwen-image-macos
python3 precache.py # downloads model once (~10 min)
cog predict -i prompt="cyberpunk cityscape" --output city.png
Note: Cog runs ~30x slower on Apple Silicon (60+ min) due to x86_64 emulation. Use native CLI for speed, cog for reproducibility/deployment.
| Method | Time | Platform | GPU | Best For |
|---|---|---|---|---|
| Native CLI | 2 min | Apple Silicon | β MPS | Speed, development |
| Cog (macOS) | 60+ min | x86_64 emulation | β CPU only | Reproducibility |
| Cog (Linux) | ~2-5 min | Native x86_64 | β CUDA | Deployment, cloud |
# Ultra-fast (4 steps with Lightning LoRA)
python qwen.py generate "cyberpunk cityscape" --ultra-fast
# Fast mode (8 steps)
python qwen.py generate "mountain landscape" --fast
# Custom settings
python qwen.py generate "robot on mars" --steps 20 --seed 42
# Test your setup
python qwen.py test
qwen.py)Prerequisites:
brew install replicate/cog/cogQuick workflow:
# 1. Pre-download model (recommended, ~10 min)
python3 precache.py
# 2. Generate images
cog predict -i prompt="robot on mars" --output robot.png
cog predict -i prompt="cyberpunk city" -i steps=10 --output city.png
When to use cog:
model_cache/ (~63GB)Check Apple Silicon GPU:
python -c "import torch; print('MPS available:', torch.backends.mps.is_available())"
Common fixes:
--steps to 20-30Native CLI generates high-quality images in ~2 minutes:

Built for Apple Silicon. Optimized for speed. Ready for deployment.
35 commits
Python
90.4%
Shell
9.6%
π¨ Native AI image generation for Apple Silicon with Qwen-Image. Lightning LoRA acceleration for fast 4β8 step runs. Zero Docker, just works.
24
stars
35
commits
Python
primary language
Sep 15, 2025
updated
Fast AI image generation for Apple Silicon. Native CLI with MPS acceleration or containerized with Cog. Lightning LoRA for 4β8 step generation.
Choose your approach:
git clone https://github.com/zsxkib/qwen-image-macos.git
cd qwen-image-macos
pip install -r requirements.txt
python qwen.py generate "cyberpunk cityscape" --ultra-fast
git clone https://github.com/zsxkib/qwen-image-macos.git
cd qwen-image-macos
python3 precache.py # downloads model once (~10 min)
cog predict -i prompt="cyberpunk cityscape" --output city.png
Note: Cog runs ~30x slower on Apple Silicon (60+ min) due to x86_64 emulation. Use native CLI for speed, cog for reproducibility/deployment.
| Method | Time | Platform | GPU | Best For |
|---|---|---|---|---|
| Native CLI | 2 min | Apple Silicon | β MPS | Speed, development |
| Cog (macOS) | 60+ min | x86_64 emulation | β CPU only | Reproducibility |
| Cog (Linux) | ~2-5 min | Native x86_64 | β CUDA | Deployment, cloud |
# Ultra-fast (4 steps with Lightning LoRA)
python qwen.py generate "cyberpunk cityscape" --ultra-fast
# Fast mode (8 steps)
python qwen.py generate "mountain landscape" --fast
# Custom settings
python qwen.py generate "robot on mars" --steps 20 --seed 42
# Test your setup
python qwen.py test
qwen.py)Prerequisites:
brew install replicate/cog/cogQuick workflow:
# 1. Pre-download model (recommended, ~10 min)
python3 precache.py
# 2. Generate images
cog predict -i prompt="robot on mars" --output robot.png
cog predict -i prompt="cyberpunk city" -i steps=10 --output city.png
When to use cog:
model_cache/ (~63GB)Check Apple Silicon GPU:
python -c "import torch; print('MPS available:', torch.backends.mps.is_available())"
Common fixes:
--steps to 20-30Native CLI generates high-quality images in ~2 minutes:

Built for Apple Silicon. Optimized for speed. Ready for deployment.
35 commits
Python
90.4%
Shell
9.6%