Limits
Every documented cap on sizes, frames, counts and request bodies.
Mode 8 refuses absurd inputs up front instead of running out of memory halfway through a job. Every cap below is part of the v1 contract and lives in mode8.limits.
Note
This page is generated from mode8 schema --section limits by docs/manual/_tools/gen_reference.py. To change it, change Mode 8 (or the prose in the generator) and run the generator with --write; a test fails when this page is out of date.
What happens at a limit#
- A value over a limit is an InputError naming the parameter (error.param): CLI exit 2, MCP error.type "InputError", Studio HTTP 400.
- A limit may be raised in a minor release; lowering one is a breaking change.
For example:
terminal
$ mode8 draft knight_right --out big.png --size 2000x2000
{"ok": false, "error": {"type": "InputError", "msg": "size sides must be within 1..1024, got 2000x2000", "param": "size", "hint": "example: mode8 draft knight_right --out drafts/hero.png"}}That exits 2. Pick a smaller value; retrying unchanged gives the same answer.
All limits#
| Limit | Value | Applies to | Where you meet it |
|---|---|---|---|
max_canvas_side | 1024 px | Largest side of a canvas Mode 8 creates: draft / tile / gen / pixelize --size, init --default-size, new project assets, UI-kit pieces. | --size, --default-size, Studio size |
max_image_side | 4096 px | Largest side of an image sent to Studio (pixels, layer images, masks). | Studio width / height |
max_fx_side | 512 px | Largest side of an FX canvas or FX source sprite. | fx --size, fx --source |
max_fx_frames | 64 | Most frames per FX kind (fx --frame-count). | fx --frame-count |
max_frames | 256 | Most frames per export and per import. | export and import inputs |
max_import_cells | 4096 | Most cells of an imported sprite sheet grid. | import --cols x --rows |
max_atlas_side | 8192 px | Largest side of a packed export atlas or an imported sprite sheet. | packed export atlas, imported sheet |
max_padding | 64 | Largest atlas frame padding in pixels (export --padding). | export --padding |
max_extrude | 16 | Most edge pixels repeated around each atlas frame (export --extrude). | export --extrude |
max_scale | 16 | Largest integer upscale (export --gif-scale, font --scale). | --gif-scale, font --scale |
max_gif_side | 4096 px | Largest side of an upscaled GIF preview frame (frame side x gif_scale). | --gif-scale x frame side |
max_fps | 60 | Largest frame rate (export / import / aseprite export --fps). | --fps, MCP / Studio fps |
max_candidates | 16 | Most candidates per generation (gen / inpaint --n, cast n, Studio jobs). | --n, MCP / Studio n |
max_render_res | 4096 px | Largest ComfyUI render resolution (gen --res). | gen --res |
max_layers | 32 | Most layers in one asset's layer stack. | layer stacks |
max_body_bytes | 2097152 bytes (2 MiB) | Studio request-body cap (413 PayloadTooLargeError above it). | Studio request bodies |
max_image_body_bytes | 100663296 bytes (96 MiB) | Studio request-body cap of the image routes. | Studio pixel, layer and inpaint bodies |
max_palette_import_bytes | 262144 bytes (256 KiB) | Largest palette text for Studio palette import. | Studio POST /api/palettes/import text |
Read the same numbers from a script:
bash
mode8 schema --section limitsor in Python:
python
from mode8 import limits
print(limits.MAX_CANVAS_SIDE)See also#
- Output Envelope and Exit Codes for the
InputErrorshape. - Stability and Versioning: limits can only go up in a minor release.