# AI Toolkit Trainer

Train custom LoRAs with ostris AI-Toolkit.

- Repository: https://github.com/artokun/comfyui-mcp (883 stars)
- Category: Data and ML
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -g -a claude-code -y`
Codex: `npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -g -a codex -y`
Cursor: `npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -g -a cursor -y`
Gemini CLI: `npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add artokun/comfyui-mcp`

## Description

Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# AI-Toolkit LoRA Trainer (WAN 2.2 & Z-Image)

## Overview

AI-Toolkit by ostris is an MIT-licensed trainer for finetuning diffusion models. It is a standalone trainer with its own web UI, not a ComfyUI custom node. It runs a Node.js UI front end over a Python (`run.py`) training backend and trains LoRAs for many model families. This skill covers the WAN 2.2 / 2.1 video models and Z-Image (Turbo & Base).

- Repo: `https://github.com/ostris/ai-toolkit` (cloned by the installers).
- Backend: `python run.py config/<job>.yml`. UI: a Node.js app under `ui/` that schedules and monitors jobs. You do not have to keep the UI open while a job runs.
- Output: a standard `.safetensors` LoRA you drop into ComfyUI `models/loras/` and load with `LoraLoaderModelOnly`.

Best for:
- WAN LoRAs. A person or character, an art style, or a specific camera or video motion, trained from image or video clip datasets. For *using* WAN see wan-t2v-video / wan-flf-video.
- Z-Image LoRAs. Fast, very low-VRAM image LoRAs (faces, characters, outfits, styles) on the 6B Z-Image base/turbo. For *using* Z-Image see z-image-base / z-image-turbo, and the z-image-xy-plot pack to compare trained LoRAs.

For low-VRAM anime image LoRAs on a different stack (kohya `sd-scripts`), see the sibling anima-lora-trainer.

> Two LoRA kinds for WAN. A WAN image LoRA trains on still images; it is cheaper (~24GB-class) and suits identity or style. A WAN video LoRA trains on short clips; it is heavier, best run on cloud, and suits *motion*. Z-Image is image-only.

## Install

The installer comes in two generations. Both clone `ostris/ai-toolkit`, set up Torch for your GPU, and launch the web UI. Put it in a folder whose full path has no spaces (e.g. `C:\AI-Toolkit`).

The rest: https://github.com/artokun/comfyui-mcp/blob/HEAD/plugin/skills/ai-toolkit-trainer/SKILL.md
