AIsketcher 0.5.0¶
Version 0.5.0 restores AIsketcher's vivid classic sketch-to-illustration quality, adds a native Apple Silicon MLX backend with measured Apple M6 benchmarks, and ships a zero-dependency stdio MCP server for design and coding agents.
Install¶
| Layer | Command | Includes |
|---|---|---|
| Core + MCP + Tour | python -m pip install "aisketcher==0.5.0" |
SDK, export/replay, aisketcher try, aisketcher mcp |
| Studio | python -m pip install "aisketcher[demo]==0.5.0" |
core plus Gradio Studio |
| Apple Silicon MLX | python -m pip install "aisketcher[mlx]==0.5.0" |
core plus native mlx and mflux on macOS arm64 |
| Local Diffusers | python -m pip install "aisketcher[local]==0.5.0" |
core plus Torch, Diffusers, and pinned ControlNet/FLUX runtimes |
| Full local + Studio | python -m pip install "aisketcher[local,demo]==0.5.0" |
local Diffusers generation and Studio |
| Full Apple Silicon | python -m pip install "aisketcher[local,mlx,demo]==0.5.0" |
Diffusers, native MLX, and Studio on Apple Silicon |
Visual quality restoration from the SDXL Base regression¶
Between v0.2 and v0.4, replacing the 2023 Lykon/DreamShaper stack with raw
stabilityai/stable-diffusion-xl-base-1.0 introduced a noticeable aesthetic
regression: washed-out contrast, flat lighting, and muted details under Canny
ControlNet.
Version 0.5.0 restores vivid sketch-to-illustration rendering with two new SHA-256-pinned, runtime-verified Canny ControlNet presets:
dreamshaper-canny@1(Restored Classic Structure, 3.58 GB) — pinsLykon/dreamshaper-8(a7e52b98680b1ba8ff7bce97c7f9f2e2e5337917) andlllyasviel/sd-controlnet-canny(7f2f69197050967007f6bbd23ab5e52f0384162a) with 35-step PNDM, guidance 7.0, aesthetic negative prompting, and fp32 VAE upcasting for clean Apple Silicon MPS output.juggernaut-xl-canny@1(Aesthetic XL, 9.44 GB) — pinsRunDiffusion/Juggernaut-XL-v9(cf419233522daa0b9ea36c3aff98fa2cab1fb0fb) withdiffusers/controlnet-canny-sdxl-1.0(eb115a19a10d14909256db740ed109532ab1483c) at 30-step UniPC for high-resolution fine-tuned SDXL rendering.
Five-panel visual verification at heritage seed 6764547109648557242 (768×576,
Canny 140/160). Provenance recorded in
docs/assets/v05-quality-qa/provenance.json.
The legacy sdxl-canny-lite@1 and sdxl-canny@1 presets remain unchanged for
strict replay of v0.2–v0.4 manifests.
Native Apple Silicon MLX backend and M6 measured benchmarks¶
Version 0.5.0 adds MlxFluxBackend and the curated mlx-flux2-klein-edit@1
preset (Apache-2.0 black-forest-labs/FLUX.2-klein-4B, 15.98 GB). It defaults
to 4-bit quantization via Studio.from_preset("mlx-flux2-klein-edit@1"),
supports explicit 8-bit quantization via MlxFluxModelConfig(quantize=8) /
MlxFluxSettings(quantize=8), and reuses PresetManager's SHA-256-verified
local cache directory directly.
Measured on Apple M6 (Mac18,5, 12-core GPU, 24 GB Unified Memory, Metal 4),
macOS Darwin 27.0.0, Python 3.12.15, torch 2.15.0, diffusers 0.43.0,
mlx 0.32.5, mflux 0.24.0 using docs/assets/pocket-kingdom/source.png
prepared at 768×576 (Canny 140/160), heritage seed 6764547109648557242 +
4-seed scout (6764547109648557242, 6854547109648557242,
6634547109688557242, 6764547109648557243) + 2 subtle structure-locked
variations + Studio.replay(..., mode="strict"):
| Preset | Backend / Device | Download | Steps / Precision | Cold + 1st | Warm (per image) | Vary (per image) | Peak Memory | Strict Replay |
|---|---|---|---|---|---|---|---|---|
dreamshaper-canny@1 |
Diffusers / MPS | 3.58 GB | 35 steps PNDM · fp16 + fp32 VAE | 46.2 s | 35.7 s (4 imgs: 142.6 s) | 19.3 s | 2.86 GB peak RSS | Pass (0 drift) |
mlx-flux2-klein-edit@1 (4-bit, default) |
MFLUX / MLX Metal 4 | 15.98 GB | 4 steps FlowMatch · 4-bit | 240.3 s* | 61.6 s (denoise 28–36 s; 4 imgs: 246.5 s) | 55.7 s | 10.10 GB MLX peak (2.78 GB RSS) | Pass (0 drift) |
mlx-flux2-klein-edit@1 (8-bit) |
MFLUX / MLX Metal 4 | 15.98 GB | 4 steps FlowMatch · 8-bit | 81.5 s | 97.7 s (4 imgs: 390.7 s) | 82.0 s | 11.61 GB MLX peak (2.78 GB RSS) | Pass (0 drift) |
juggernaut-xl-canny@1 |
Diffusers / MPS | 9.44 GB | 30 steps UniPC · fp16 + fp32 VAE | 33.0 s (1 img) | Single-image recommended on 24 GB MPS** | — | — | Pass |
* 4-bit cold time includes first-ever Metal shader compilation and on-load 4-bit quantization; subsequent runs use the compiled cache (see 8-bit 81.5 s cold load).
** On 24 GB MPS, per-seed MPS pipeline reload isolation can pressure 24 GB unified memory on multi-seed runs; use dreamshaper-canny@1 or mlx-flux2-klein-edit@1 for fast multi-seed Apple Silicon scouting, and juggernaut-xl-canny@1 on CUDA or single-image MPS renders.
See the Apple Silicon MLX guide for setup, quantization options, and four-seed visual QA contact sheets.
Zero-dependency stdio MCP server¶
aisketcher mcp (and python -m aisketcher.mcp_server) exposes AIsketcher's
complete reproducible study lifecycle to coding and design agents over
newline-delimited JSON-RPC 2.0 stdio using only Python's standard library and
AIsketcher core:
- 6 tools:
aisketcher_list_presets,aisketcher_prepare_sketch,aisketcher_explore_seeds,aisketcher_vary_candidate,aisketcher_inspect_manifest, andaisketcher_replay_manifest. - Workspace containment:
--workspace-dirconfines every input, output, and manifest path to the chosen workspace directory tree. - Offline by default:
allow_downloadsdefaults toFalseso agent tool calls fail closed instead of initiating unapproved multi-GB transfers. - Stdout isolation: backend output is redirected to
stderrto preserve clean JSON-RPC framing onstdout.
See the MCP server guide for 3-line setup snippets for Claude Code, Codex CLI, and Copilot CLI.
18-second animated demo GIF and large-video CI guard¶
- Added
docs/assets/aisketcher-v05-demo.gif(18.0 s, 1.49 MiB,720×405, 20 variable-delay frames, metadata-free, built from real Apple M6 outputs with provenance indocs/assets/aisketcher-v05-demo.provenance.json). - Extended
.gitignore(*.mp4,*.mov,*.webm,*.mkv) and the distribution/repository policy scanner (tests/docs/scan_distribution.py) to reject committed or packaged raw video files (.mp4,.mov,.webm,.mkv,.avi) and any GIF larger than 5 MiB.
CI and dependency maintenance¶
- Incorporated Dependabot GitHub Actions SHA updates (PRs #19, #20, and #21)
pinning
actions/upload-artifactv7,actions/download-artifactv8, andactions/deploy-pagesv5 to reviewed full commit SHAs. - Pinned the
studio-browserPlaywright Chromium regression job toubuntu-24.04in CI to keep browser system-dependency installs deterministic.
Compatibility¶
- All existing v0.2–v0.4 versioned presets (
flux2-klein-edit@1,sdxl-canny-lite@1,sdxl-canny@1) and manifest v1 files remain valid and replayable. - The base
aisketcherwheel remains free of Torch, Diffusers, Gradio, MLX, and external MCP SDK dependencies. device: mlxis accepted inaisketcher initandAIsketcherConfig.
License boundary¶
Source code and documentation text are MIT licensed. Drawings, generated
outputs, demo animations, and visual QA images under docs/assets/ remain
outside the MIT grant; read the
artwork notice
before reuse.

