Tooluck logoTooluck
SKILL.md

train-character-lora

Agent skill fromartokun/comfyui-mcp

Train a character/identity LoRA locally on FLUX.1-dev via the comfyui-mcp train_* tools (GPU Docker + ostris ai-toolkit). Use when the user wants to train a LoRA of a person/character from their photos on the local GPU. Covers dataset prep, launch, monitoring, and using the result in ComfyUI. For WAN/Z-Image training via the ai-toolkit UI see ai-toolkit-trainer.

How to install train-character-lora

install train-character-lora
# install the comfyui-mcp pack with the skills CLI
npx skills add artokun/comfyui-mcp

# or add only this skill to Claude Code: copy the folder

plugin/skills/train-character-lora/

# into

~/.claude/skills/train-character-lora/ (all projects)

.claude/skills/train-character-lora/ (one project)

plugin/skills/train-character-lora/SKILL.md

MITFull file
1# Train a Character LoRA (local, Flux.1-dev)
2
3## Overview
4
5The trainer runs ostris ai-toolkit's `run.py` inside a headless GPU Docker container,
6driven through the three `train_*` MCP tools. You (the LLM) are the UI. Each takes
7an `action`: `train_prepare_dataset` owns the datasets, `train_start` owns the jobs, and
8`train_doctor` owns the trainer itself. You generate the dataset, launch the job, watch
9progress, and the finished LoRA lands in ComfyUI `models/loras/` and the LoRA catalog
10without further steps.
11
12- Base model: FLUX.1-dev (the best proven character consistency; needs ~24GB VRAM with
13 quantization, RTX 4090 class).
14- Phase-1 scope: character LoRAs only. Style/slider/edit and other bases come later.
15
16## The flow (tool sequence)
17
181. `train_doctor {action:"doctor"}`. Preflight once per session. Checks docker daemon,
19 `--gpus all` GPU passthrough, trainer image, HF_TOKEN. If `image:false`, run
20 `train_doctor {action:"build_image"}` (one-time, several minutes, since it builds CUDA
21 plus torch plus ai-toolkit). If `hfTokenSet:false`, warn the user: the first run
22 downloads FLUX.1-dev (gated HF repo) and needs `HF_TOKEN` in the MCP server env.
232. `train_prepare_dataset {action:"prepare"}`. Stage the images. See "Dataset" below.
243. `train_start {action:"start"}`. Launch. Returns a job id at once; training runs
25 detached.
264. `train_start {action:"status", id}`. Poll progress (`progress.step/totalSteps/loss`,
27…

Excerpt shown under the repository's MIT license.

More skills in comfyui-mcp

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates