ai-toolkit-trainer

ai-toolkit-trainer is a skill for Claude Code from artokun/comfyui-mcp. It costs 93 tokens per session (3,112 once invoked), scanned A, original, MIT.

A guide for training custom LoRAs with ostris AI-Toolkit. A LoRA is a small model add-on that teaches an image or video model a person, character, style, outfit, or motion from examples.

In plain words
What is it for?
Use it to train WAN 2.1 or 2.2 video LoRAs and Z-Image Turbo or Base image LoRAs, then use the resulting .safetensors file in ComfyUI.
Why use it?
It organizes dataset preparation, local or RunPod setup, training settings, and the step of loading the result into ComfyUI. It also explains that AI-Toolkit runs separately from ComfyUI.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the comfy plugin — 42 skills, 11 commands, 4 agents, 2 hooks shipped together

Good fit Use it to train WAN 2.1 or 2.2 video LoRAs and Z-Image Turbo or Base image LoRAs, then use the resulting .safetensors file in ComfyUI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/artokun/comfyui-mcp/ai-toolkit-trainer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer
Clone the repo
git clone --depth 1 https://github.com/artokun/comfyui-mcp

Made for: Claude Code.

Or install comfy, the plugin that ships this one along with the rest of its 42 skills, 11 commands, 4 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-toolkit-trainer

README.md
[![agentmods](https://agentmods.dev/badge/skills/artokun/comfyui-mcp/ai-toolkit-trainer/github.svg)](https://agentmods.dev/skills/artokun/comfyui-mcp/ai-toolkit-trainer)
Your own site
<a href="https://agentmods.dev/skills/artokun/comfyui-mcp/ai-toolkit-trainer"><img src="https://agentmods.dev/badge/skills/artokun/comfyui-mcp/ai-toolkit-trainer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-toolkit-trainer

Your own site · 80×15
<a href="https://agentmods.dev/skills/artokun/comfyui-mcp/ai-toolkit-trainer"><img src="https://agentmods.dev/badge/skills/artokun/comfyui-mcp/ai-toolkit-trainer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,112 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.03112
Opus 5 $0.00046 $0.01556
Sonnet 5 $0.00019 $0.00622
Haiku 4.5 $0.00009 $0.00311

Measured 13d ago against content hash 0deb84398f3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ai-toolkit-trainer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- V2, `AI-TOOLKIT_AUTO_INSTALL-V2.bat` (recommended), uses an embedded Python 3.10.11, auto-installs Git and Node, builds a clean PATH without your system Python, and adds aggressive pip/curl retries. It has far fewer pr
plugin/skills/ai-toolkit-trainer/SKILL.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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).

  • V1, AI-TOOLKIT_AUTO_INSTALL.bat, expects Git, Python 3.10.x, and Node 18+ already in PATH.
  • V2, AI-TOOLKIT_AUTO_INSTALL-V2.bat (recommended), uses an embedded Python 3.10.11, auto-installs Git and Node, builds a clean PATH without your system Python, and adds aggressive pip/curl retries. It has far fewer prerequisites and fails less often. The Z-Image Turbo LoRA training release used it.

Read the full file on GitHub · 151 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 151 lines · 93 tokens per session scan A 0deb84398f3e

Subscribe to this mod's changes

ai-toolkit-trainer is a skill published in the GitHub repository artokun/comfyui-mcp (740 stars, last pushed 2d ago), licensed MIT. It adds 93 tokens to every session and 3,112 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

chief-revenue-officer

Owns the revenue engine end to end: sales, monetization, pricing, customer success, retention, and partnerships. Use this for pricing and packaging decisions, sales strategy and coverage, forecast and pipeline health, churn and expansion, partner and channel strategy, or when marketing-sourced demand is not…

cbrock84/headcount · 80 tokens

chief-strategy-officer

Owns where the business plays and how it wins over a multi-year horizon — portfolio choices, corporate development, strategic partnerships, and planning under uncertainty. Use this for a decision about which markets or businesses to be in, whether to build, buy, or partner, how to allocate capital across business…

cbrock84/headcount · 93 tokens

dev

One-command dev loop boot. Spins up portless (named HTTPS subdomain), emulate (stateful API mocks), the project's dev server, and an agent-browser session, all keyed to the current git branch. Use when starting a feature branch, switching worktrees, or returning to a project after a break. Skips silently with install…

yonatangross/orchestkit · 76 tokens

storybook-mcp-integration

Reference for the Storybook MCP server itself (@storybook/addon-mcp): 6 tools across 3 toolsets (dev, docs, testing), availability detection, and per-agent toolset filtering. Use when setting up the server or calling these tools directly against components that already exist. For the end-to-end pipeline that turns a…

yonatangross/orchestkit · 91 tokens

Product Photoshoot Workflow

A workflow for turning one product photo into a set of four e-commerce images from different visual directions.

jau123/MeiGen-AI-Design-MCP · 112 tokens

neo4j-modeling-skill

Design, review, and refactor Neo4j graph data models. Use when choosing node labels vs relationship types vs properties, migrating relational/document schemas to graph, detecting anti-patterns (generic labels, supernodes, missing constraints), designing intermediate nodes for n-ary relationships, enforcing schema with…

neo4j-contrib/neo4j-skills · 152 tokens