- name
SKILL.md
Le fichier du skill reste dans le dépôt de l'éditeur.
Collez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -a cursor -yCollez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -a claude-code -yCollez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -a codex -yCollez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill ai-toolkit-trainer -a grok -yEnvoyez le message copié dans un chat Grok Bot. Le Bot récupère ce SKILL.md sur GitHub et l'ajoute aux skills que partagent tous vos Bots.
Install this skill: https://github.com/artokun/comfyui-mcp/tree/HEAD/plugin/skills/ai-toolkit-trainerDe l'éditeur
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).
https://github.com/ostris/ai-toolkit (cloned by the installers).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..safetensors LoRA you drop into ComfyUI models/loras/ and load with LoraLoaderModelOnly.Best for:
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.
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).
AI-TOOLKIT_AUTO_INSTALL.bat, expects Git, Python 3.10.x, and Node 18+ already in PATH.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.Both are CUDA-aware and select the Torch wheel by GPU generation:
Each then clones ostris/ai-toolkit, downloads two launcher scripts (LAUNCHER-TOOLKIT.bat, SECURE_LAUNCHER-TOOLKIT.bat, from https://huggingface.co/Aitrepreneur/FLX/resolve/main/), makes the venv, installs Torch from the chosen index, runs pip install -r requirements.txt, then cd ui && npm run build_and_start.
AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh (and -V2.sh)Installs into the persistent volume /workspace/ai-toolkit. It is idempotent; a re-run just relaunches the UI. Use RunPod's PyTorch 2.8.0 template and a 100GB disk. It installs apt deps, clones the repo, makes a venv, installs Torch (torchaudio included), installs nvm + Node 22, then builds and starts the UI.
The UI listens on 8675 and Jupyter on 8888. Set AI_TOOLKIT_AUTH (UI password) before launch. Reach it at https://${RUNPOD_POD_ID}-8675.proxy.runpod.net. Use an RTX 4090/5090 for image (WAN t2i/t2v, Z-Image) LoRAs and an RTX 6000 Pro (Blackwell) for heavy WAN video, high-res, or high-rank jobs.
LAUNCHER-TOOLKIT.bat (local) or SECURE_LAUNCHER-TOOLKIT.bat (password-protected) from the ai-toolkit folder..sh. It detects the install and starts the UI on :8675.In the UI, create a Job, point it at a dataset folder, pick the model (WAN variant or Z-Image), set params, and start. Jobs run in the Python backend, so you can close the browser. To bypass the UI, copy a config/examples/*.yml, edit it, and run python run.py config/<job>.yml.
AI-Toolkit pairs each sample with a same-basename .txt caption and auto-resizes/buckets aspect ratios (no pre-cropping).
my_dataset/
001.png 001.txt
002.jpg 002.txt
Short clips plus a .txt per clip; caption the motion or camera move. Set per-clip frames via the job's num_frames (e.g. 81). This is markedly heavier, so prefer cloud GPUs.
WAN 2.2 14B is a Mixture-of-Experts with a high-noise expert (structure/motion) and a low-noise expert (detail). AI-Toolkit trains both via Multi-stage.
Z-Image is a ~6B single-stream model with no hi/lo multi-stage. Leave Multi-stage OFF; you train one model. It is the lightest target here. The headline of the Z-Image releases is training on very low VRAM.
Train on Base, deploy anywhere. Z-Image Base is the finetuning-friendly model; a LoRA trained on Base generally applies to the Turbo workflow too. Use the z-image-xy-plot pack to grid-compare your trained LoRAs.
The param tables are aggregated starting points from community and training-guide sources, not read from the repo's
config/examples/*.yml. Open the actual WAN / Z-Image example config in your clone and tune. See "Unverified".
<your_lora>.safetensors into ComfyUI models/loras/.LoraLoaderModelOnly:
LoraLoaderModelOnly on the Z-Image model path (see the z-image-base / z-image-turbo packs). Strength 0.7 to 1.0.{ "class_type": "LoraLoaderModelOnly",
"inputs": { "model": ["<base_model>", 0],
"lora_name": "<your_lora>.safetensors",
"strength_model": 1.0 } }
No module named 'torchaudio' when starting a job (AI-Toolkit). The venv's Torch stack is mismatched. Activate the AI-Toolkit venv (venv\Scripts\activate), then pip uninstall torch torchaudio torchvision -y and pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 (or your CUDA's index). This only affects the AI-Toolkit install, not ComfyUI.self and mat2 must have the same dtype (ComfyUI-WanVideoWrapper, WAN usage). Re-clone ComfyUI-WanVideoWrapper in custom_nodes/ and reinstall its requirements.txt, then restart ComfyUI.pip install onnxruntime==1.20.1 in the affected venv.AI_TOOLKIT_AUTH is set and you're on the 8675 proxy URL.config/examples/*.yml. Open the actual example config in your clone and adjust..bat files are downloaded from a third-party HuggingFace repo (Aitrepreneur/FLX); review before running on a security-sensitive machine.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; c
---name: ai-toolkit-trainerdescription: Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image…---# plugin/skills/ai-toolkit-trainer/SKILL.mdVue d'ensemble
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.
FAQ
Téléchargez plugin/skills/ai-toolkit-trainer/SKILL.md auprès de l'éditeur, ou copiez le chemin et ouvrez le dépôt. PlugMCP répertorie le skill et n'héberge pas le fichier.
L'éditeur le maintient sur https://github.com/artokun/comfyui-mcp.
Claude, Cursor, Codex et Grok Build peuvent lire un SKILL.md que vous ajoutez depuis le dépôt de l'éditeur. Grok Bot l'installe lorsque vous envoyez dans un chat le lien du dossier GitHub du skill.