Text-to-Image
GGUF
English
Chinese
diffusion
z-image
s3-dit
quantized
on-device
ios
mobile
apple-silicon
imatrix
conversational
Instructions to use jc-builds/Z-Image-Turbo-iOS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use jc-builds/Z-Image-Turbo-iOS with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="jc-builds/Z-Image-Turbo-iOS", filename="Qwen3-4B-Instruct-2507-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "\"Astronaut riding a horse\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use jc-builds/Z-Image-Turbo-iOS with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M # Run inference directly in the terminal: llama-cli -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M # Run inference directly in the terminal: llama-cli -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Use Docker
docker model run hf.co/jc-builds/Z-Image-Turbo-iOS:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use jc-builds/Z-Image-Turbo-iOS with Ollama:
ollama run hf.co/jc-builds/Z-Image-Turbo-iOS:Q4_K_M
- Unsloth Studio new
How to use jc-builds/Z-Image-Turbo-iOS with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jc-builds/Z-Image-Turbo-iOS to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jc-builds/Z-Image-Turbo-iOS to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jc-builds/Z-Image-Turbo-iOS to start chatting
- Pi new
How to use jc-builds/Z-Image-Turbo-iOS with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jc-builds/Z-Image-Turbo-iOS:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use jc-builds/Z-Image-Turbo-iOS with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use jc-builds/Z-Image-Turbo-iOS with Docker Model Runner:
docker model run hf.co/jc-builds/Z-Image-Turbo-iOS:Q4_K_M
- Lemonade
How to use jc-builds/Z-Image-Turbo-iOS with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jc-builds/Z-Image-Turbo-iOS:Q4_K_M
Run and chat with the model
lemonade run user.Z-Image-Turbo-iOS-Q4_K_M
List all available models
lemonade list
docs: add prompting guide + simple-vs-ideal prompt table (Qwen3 LLM encoder favours long natural-language)
Browse files
README.md
CHANGED
|
@@ -83,6 +83,28 @@ let image = try await engine.generate(.init(
|
|
| 83 |
|
| 84 |
That's the whole pipeline. See the [Mirage README](https://github.com/haplollc/Mirage) for the full SwiftUI example.
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
## Performance (measured via Mirage)
|
| 87 |
|
| 88 |
| Device | 1024² @ 9 steps | 512² @ 9 steps |
|
|
|
|
| 83 |
|
| 84 |
That's the whole pipeline. See the [Mirage README](https://github.com/haplollc/Mirage) for the full SwiftUI example.
|
| 85 |
|
| 86 |
+
## Prompting guide
|
| 87 |
+
|
| 88 |
+
Z-Image-Turbo conditions on the **Qwen3-4B-Instruct** text encoder, which means it reads prompts the way an instruction-tuned LLM does — **long, natural-language descriptions outperform short tag lists**. The official Tongyi-MAI examples are essentially short paragraphs describing subject, pose, attributes, environment, and lighting in flowing prose.
|
| 89 |
+
|
| 90 |
+
**Common pitfall: fusion concepts.** Prompts of the form *"X as Y"* (e.g. "The Statue of Liberty as a dog") fail because the text encoder parses `Statue of Liberty` and `dog` as two separate noun phrases, and the diffusion model dutifully paints both side-by-side. To get a single **fused** subject, write the fused entity as **one noun** and then describe pose / attributes / setting that pull in the second concept.
|
| 91 |
+
|
| 92 |
+
| Simple English (what fails) | Prompt that works on Z-Image-Turbo |
|
| 93 |
+
|---|---|
|
| 94 |
+
| "The Statue of Liberty as a dog" | A bronze statue of a golden retriever standing on a stone pedestal on Liberty Island, posed exactly like the Statue of Liberty: right paw raised holding a flaming torch, left paw clutching an engraved stone tablet, a seven-pointed crown on its head, weathered green-bronze patina, photographed at golden hour with the New York harbor in the background, photorealistic |
|
| 95 |
+
| "A cat in a city" | A photograph of a tabby cat sitting on a black metal fire escape in lower Manhattan at dusk, neon shop signs glowing across the street, warm yellow light spilling from windows behind it, shallow depth of field, 35mm film aesthetic |
|
| 96 |
+
| "A robot drinking coffee" | A close-up photograph of a humanoid robot with brushed-aluminum face plates sitting at a cafe table, both hands wrapped carefully around a ceramic latte cup, steam rising past glowing blue eye sensors, warm bokeh of cafe lights in the background, late afternoon light, photorealistic |
|
| 97 |
+
| "Sunset over the ocean" | A wide-angle photograph of the Pacific Ocean at sunset viewed from a basalt cliff in Big Sur, sun a deep orange disk just touching the horizon, sky transitioning from violet at zenith to peach and gold at the horizon, foreground tide pools mirroring the sky, dramatic |
|
| 98 |
+
| "A wizard in a forest" | A digital painting of an elderly wizard in dark blue robes embroidered with silver constellations, leaning on a gnarled oak staff with a glowing crystal at its tip, standing in a misty old-growth redwood forest at dawn, soft shafts of light cutting through the trees, painterly style |
|
| 99 |
+
|
| 100 |
+
**Heuristics that work well on Z-Image:**
|
| 101 |
+
|
| 102 |
+
- **Describe like you're talking to a person.** Full sentences. Qwen3 understands intent, not keyword vectors.
|
| 103 |
+
- **Lead with the medium.** "A photograph of...", "A digital painting of...", "A studio portrait of..." anchors the style early.
|
| 104 |
+
- **Be specific about what's in frame.** Lens, lighting direction, time of day, background. The model has plenty of capacity for detail; vague prompts pay for it in vagueness.
|
| 105 |
+
- **English and Chinese both work** — Z-Image was trained bilingually.
|
| 106 |
+
- **For fusion concepts**: pick one noun for the fused subject, then *attribute* the other concept via pose / clothing / context. "A golden retriever statue *in the pose of* the Statue of Liberty" works; "A golden retriever *and* the Statue of Liberty" doesn't.
|
| 107 |
+
|
| 108 |
## Performance (measured via Mirage)
|
| 109 |
|
| 110 |
| Device | 1024² @ 9 steps | 512² @ 9 steps |
|