train-character-lora

Featured

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.

AI & Automation 738 stars 120 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
96
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

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

Details

Author
artokun
Repository
artokun/comfyui-mcp
Created
6 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category