> ## Documentation Index
> Fetch the complete documentation index at: https://0xcat.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Generation

Akio supports local text-to-image generation using the `image` (or `img`) command. It runs entirely on-device — no external API required.

## Supported Models

| Alias | HuggingFace Repo | Default Steps | Notes |
| - | - | - | - |
| `Z-Image-Turbo` | `Tongyi-MAI/Z-Image-Turbo` | 9 | Optimized for fast inference |

## Quickstart

**1. Pull the model**

```bash theme={null}
akio pull Tongyi-MAI/Z-Image-Turbo
```

**2. Generate an image**

```bash theme={null}
akio image --model turbo --prompt "a cute orange cat sitting on a rooftop looks at a sunset in studio ghibli-style"
```

![Z Image Output](https://mintcdn.com/0xcat/BHMfhsC-nJOOUTr9/images/z_image_output.png?fit=max\&auto=format\&n=BHMfhsC-nJOOUTr9\&q=85\&s=d5a09ab377523e6cbb5e3bd47da6eeb0)

The output is saved to `z_image_output.png` by default.

## Options

| Flag | Type | Default | Description |
| - | - | - | - |
| `-m`, `--model` | `string` | *(required)* | HuggingFace repo of the model to use |
| `--prompt` | `string` | *(required)* | Text prompt describing the image |
| `--negative-prompt` | `string` | `""` | Prompt to steer generation away from |
| `--height` | `usize` | model default | Output height in pixels (must be divisible by 16) |
| `--width` | `usize` | model default | Output width in pixels (must be divisible by 16) |
| `--num-steps` | `usize` | model default (9) | Number of denoising steps |
| `--guidance-scale` | `f64` | model default | Classifier-free guidance (CFG) scale |
| `--seed` | `u64` | random | Seed for reproducible outputs |
| `--output` | `string` | `output.png` | Output filename |
| `--cpu` | flag | false | Force CPU inference instead of GPU |

## Examples

**Custom resolution and seed**

```bash theme={null}
akio img \
  --model turbo \
  --prompt "a futuristic city skyline, neon lights, cinematic" \
  --width 1024 \
  --height 576 \
  --seed 42 \
  --output city.png
```

**With negative prompt and guidance scale**

```bash theme={null}
akio img \
  --model turbo \
  --prompt "a serene mountain lake at dawn, photorealistic" \
  --negative-prompt "blurry, low quality, distorted" \
  --guidance-scale 3.5 \
  --output lake.png
```

**CPU-only inference**

```bash theme={null}
akio img \
  --model turbo \
  --prompt "a red panda in a bamboo forest" \
  --cpu \
  --output panda.png
```

## Notes

> [accordion] Image dimensions
>
> Width and height must both be divisible by **16**. If you pass an invalid size, Akio will suggest the nearest valid dimensions.

> [accordion] Reproducibility
>
> Pass `--seed` with a fixed integer to get the same image across runs. Without it, a random seed is used each time.

> [accordion] GPU acceleration
>
> GPU is used by default when available (Metal on macOS, CUDA on Linux/Windows). Use `--cpu` to override.

> [accordion] Model weights location
>
> Weights are stored in the same directory as models downloaded via `akio pull`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.