Set Up Local AI
Run ComfyUI on your own GPU, download the open models with mode8 setup, and check the whole setup with mode8 doctor.
Mode 8 generates art on your own machine. It sends the work to ComfyUI, a local image-generation server, running open-weight Apache-2.0 models. Nothing goes to a cloud service and nothing needs an account.
Only four commands talk to ComfyUI: mode8 gen, mode8 inpaint, mode8 cast and mode8 doctor, plus the Studio's Generate tab. Everything else in Mode 8 runs without it, so you can skip this page until you want to generate characters.
You need a GPU that ComfyUI supports and disk space for the models: 12.5 GB for sprites alone (kleinedit), 25.3 GB for every art type (all).
Hardware & VRAM#
| Setup | What works | Notes |
|---|---|---|
| No GPU (CPU only) | Everything except gen, inpaint, cast, icons | Starters, drafts, tiles, autotiles, UI kits, fonts, animation, recolor, FX, Studio, and all engine exports |
| 8–12 GB GPU (RTX 3060 / 4060 / 4070, RX 7600) | Both presets (kleinedit & style) | Works out of the box via ComfyUI's automatic CPU offloading; kleinedit sprites are fast |
| 16 GB+ GPU (RTX 4070 Ti S / 4080 / 3090 / 4090, RX 6800–7900) | Both presets at full speed | Keeps models resident in VRAM with minimal offload |
| Apple Silicon (16 GB+ unified memory) | Both presets via MPS | Works with ComfyUI Desktop on macOS |
The two presets#
Each generation uses one of two presets, a ComfyUI workflow with its own models. You rarely pick one: the art type does.
| Preset | Models | Used for |
|---|---|---|
kleinedit | FLUX.2 Klein 4B, its Qwen3 text encoder and VAE | Repainting a draft: side-view sprites and top-down characters, inpainting a region, keeping a cast in one style |
style | Z-Image-Turbo with a pixel-art LoRA | Drawing from the prompt alone: portraits, isometric buildings, scenes, PC-98 cutscenes, visual-novel busts, and icons |
1. Install and start ComfyUI#
Pick the easiest installer for your OS:
- Windows / macOS (easiest): Download ComfyUI Desktop — it bundles the right PyTorch build for your GPU automatically. Start it once and leave it open (it listens on
http://127.0.0.1:8188). - Linux / CLI (
comfy-cli):pip install comfy-cli && comfy install && comfy launchhandles GPU PyTorch wheels automatically. - Manual clone: Follow ComfyUI's install guide for your CUDA/ROCm PyTorch wheel, then:
git clone https://github.com/comfyanonymous/ComfyUI ~/ComfyUI
cd ~/ComfyUI
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtThen start it on the address Mode 8 expects, and leave it running:
python main.py --listen 127.0.0.1 --port 8188Mode 8 needs no custom nodes: every node both presets use ships built into ComfyUI.
2. Download the models#
mode8 setup downloads exactly the files a preset needs into the right folders of your ComfyUI. See what it would do first:
$ mode8 setup --comfy-dir ~/ComfyUI --dry-run
Would download 3 models (12.5 GB) into ComfyUI/
+ flux-2-klein-4b-fp8.safetensors 4.1 GB to download
+ qwen_3_4b.safetensors 8.0 GB to download
+ flux2-vae.safetensors 336 MB to download
Next:
mode8 setup --comfy-dir ComfyUI --preset kleineditThen download them. Run it again at any time: it skips files that are already there, and it resumes a download that was cut off.
mode8 setup --comfy-dir ~/ComfyUIThat gets the kleinedit models, which is all sprites need. For portraits, isometric art, scenes and icons, add the style models:
$ mode8 setup --comfy-dir ~/ComfyUI --preset all --dry-run
Would download 6 models (25.3 GB) into ComfyUI/
+ flux-2-klein-4b-fp8.safetensors 4.1 GB to download
+ qwen_3_4b.safetensors 8.0 GB to download
+ flux2-vae.safetensors 336 MB to download
+ z_image_turbo_bf16.safetensors 12.3 GB to download
+ ae.safetensors 335 MB to download
+ pixel_art_style_z_image_turbo.safetensors 170 MB to download
Next:
mode8 setup --comfy-dir ComfyUI --preset allmode8 setup --comfy-dir ~/ComfyUI --preset allIf Hugging Face asks you to log in for a file, set HF_TOKEN to an access token before running mode8 setup. To download through a mirror, set HF_ENDPOINT to its address.
Models you already have#
If your ComfyUI already holds these models under other file names, skip the download and tell Mode 8 the names instead, in the environment of the shell (or Studio) that runs mode8:
| Variable | Names |
|---|---|
MODE8_KLEIN_UNET, MODE8_KLEIN_CLIP, MODE8_KLEIN_VAE | the kleinedit model, text encoder and VAE |
MODE8_ZIMAGE_UNET, MODE8_ZIMAGE_CLIP, MODE8_ZIMAGE_VAE | the style model, text encoder and VAE |
MODE8_ZIMAGE_LORA | the style pixel-art LoRA |
3. Check the setup#
With ComfyUI running, ask Mode 8 whether everything is in place:
$ mode8 doctor
✓ Mode 8 is ready for AI generation
mode8 1.0.0 · Python 3.14.8 · Linux x86_64 · mcp ✓ studio ✓ godot ✓
✓ ComfyUI 0.43.0 at http://127.0.0.1:8188 · AMD Radeon Graphics
✓ kleinedit ready (sprite, topdown)
✓ style ready (portrait, isometric, scene, icon)
Next:
mode8 gen "red potion in a round flask" --art-type icon --colors 12 --out potion.pngmode8 doctor asks the running ComfyUI for every node and model file each preset needs, and reports your Mode 8, Python and extras on the way. When something is missing it names it, with the exact command that fixes it: usually a mode8 setup line, or how to start ComfyUI. It exits 0 when every preset is ready and 1 when one is not, so a script can test it. --preset kleinedit checks one preset only.
When ComfyUI is not running at all, mode8 doctor says it could not reach it, and that the commands that do not need it still work.
Use a ComfyUI on another machine#
ComfyUI can run on another computer, such as a GPU box on your network. Mode 8 picks the address in this order, first match wins:
--comfy-url URLon the command (comfy_urlon the MCP tools).- The
COMFY_URLenvironment variable. comfy_urlin the project'smode8.toml(the nearest one at or above the current folder).http://127.0.0.1:8188.
The easiest is to set it once per project, when you make it:
$ mode8 init my-game --comfy-url http://192.168.1.20:8188
✓ Created project my-game/
palette nes_crimson_hero · new assets 64x72 · ComfyUI http://192.168.1.20:8188
Next:
cd my-game
mode8 draft knight_right --out drafts/hero.png
mode8 studio .
mode8 doctor # check the local AI setup for mode8 gen$ cat my-game/mode8.toml
name = "my-game"
version = 1
default_palette = "nes_crimson_hero"
default_size = [64, 72]
comfy_url = "http://192.168.1.20:8188"Every command you run inside my-game/ now uses that address, and so does the Studio. On the GPU box, start ComfyUI with --listen 0.0.0.0 so it accepts connections from your network.
When ComfyUI is down#
Nothing else breaks. A command that needs ComfyUI stops at once with exit code 3 and says how to start it; your files are untouched, and the candidates it had already finished are kept. A mistake in your input, such as a missing draft, is caught before ComfyUI is contacted (exit 2), so you never wait for a render to learn about a typo. Troubleshooting shows both.
Next#
- Your first character: draft, generate, animate and export a hero.
- Sprites: every way to generate, and how Mode 8 picks the best candidate.
- Troubleshooting: what each error means.