Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

ai-toolkit-trainer

Skill by artokun

Trains custom WAN 2.2/2.1 and Z-Image LoRAs with ostris AI-Toolkit. Covers local and RunPod setup, dataset prep, key parameters, and using the result in ComfyUI.

  • Score 74
  • 972 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install ai-toolkit-trainer

Built from the published package, never by AI.

git clone --depth 1 https://github.com/artokun/comfyui-mcp /tmp/comfyui-mcp && mkdir -p ~/.claude/skills && cp -r /tmp/comfyui-mcp/plugin/skills/ai-toolkit-trainer ~/.claude/skills/ai-toolkit-trainer

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install ai-toolkit-trainer in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides an assistant through training custom LoRAs with ostris AI-Toolkit, an MIT-licensed trainer with its own web UI. It covers WAN 2.2 and 2.1 LoRAs for people, styles, and video motion, and Z-Image (Turbo and Base) image LoRAs for low-VRAM setups. It also covers dataset preparation, key training parameters, and loading the output into a ComfyUI workflow.

The trainer runs a Node.js UI over a Python backend, and jobs can also be started with run.py and a config file. Installers are provided for Windows and RunPod. The output is a .safetensors LoRA. The skill is aimed at users who want to train a WAN or Z-Image LoRA and need setup and tuning guidance.

Written from the project's SKILL.md and checked against it.

What it can do

  • Local Windows setupInstaller scripts choose the Torch build based on the GPU generation.
  • RunPod setupInstalls AI-Toolkit into a persistent volume and starts the UI on port 8675.
  • Dataset preparationPairs each image or clip with a same-basename .txt caption file.
  • WAN 2.2 parametersGives starting values for rank, learning rate, steps, resolution and Multi-stage.
  • Z-Image parametersGives starting values for a single-stream model with Multi-stage off.
  • VRAM guidanceDescribes which GPUs suit image LoRAs, WAN video LoRAs and high-res jobs.
  • ComfyUI loadingShows how to load the trained LoRA with LoraLoaderModelOnly.
  • TroubleshootingCovers errors such as torchaudio mismatch, OOM, and Blackwell onnxruntime issues.

What you need

  • Windows or Linux with an NVIDIA GPU (CUDA 12.6 or 12.8 builds)
  • Git, Python 3.10.x and Node.js 18+ for the V1 Windows installer
  • RunPod account using the PyTorch 2.8.0 template with a 100GB disk
  • About 24GB VRAM locally for WAN image LoRAs

Try asking

  • Set up AI-Toolkit on RunPod and train a WAN 2.2 LoRA for my character
  • Prepare a caption dataset for a Z-Image style LoRA
  • Load my trained LoRA into a ComfyUI WAN 2.2 workflow with LoraLoaderModelOnly

Good to know

  • WAN video LoRAs are heavier and best run on cloud GPUs.
  • Z-Image is image-only. Video motion LoRAs apply to WAN.
  • The parameter tables are community starting points, not taken from the repo configs.
  • The launcher .bat files come from a third-party HuggingFace repo.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugin/skills/ai-toolkit-trainer/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to ai-toolkit-trainer

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

ai-toolkit-trainer: common questions

Does AI-Toolkit require ComfyUI?

No. The source describes AI-Toolkit as a standalone trainer with its own web UI, not a ComfyUI custom node. Its output is a .safetensors LoRA that ComfyUI can load.

What GPU do I need for a Z-Image LoRA?

The source describes Z-Image as the lightest target, trainable on modest consumer GPUs with quantization. It says a 4090 is comfortable and smaller cards work with float8 at 512 to 768 resolution.

How many images are needed for a person LoRA?

The source suggests about 15 to 40 varied images for a person, each with a caption that includes a unique trigger word.

How do I install ai-toolkit-trainer?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is ai-toolkit-trainer free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is ai-toolkit-trainer safe to use?

It scores 74 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to ai-toolkit-trainer?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

ai-toolkit-trainer Install

Add to stack

Loading.