/comfy:train-character-lorafrom comfy
Trains a character/identity LoRA locally on FLUX.1-dev using comfyui-mcp train_* tools (GPU Docker + ostris ai-toolkit). Covers dataset prep, launch, monitoring, and using the result in ComfyUI.
Ships in comfy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
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.train_prepare_dataset {action:"prepare"}. Stage the images. See "Dataset" below.train_start {action:"start"}. Launch. Returns a job id at once; training runs
detached.train_start {action:"status", id}. Poll progress (progress.step/totalSteps/loss,
recent samples, log tail). Poll on a slow cadence (every few minutes). A 2000-step
run is roughly an hour on a 4090. Don't block on it.status:"completed" means the .safetensors was copied to
models/loras/<name>.safetensors and upserted into the LoRA catalog (result has the
paths and catalog id). Verify by loading it in a Flux workflow (LoraLoaderModelOnly,
strength 1.0) with the trigger word in the prompt.Call train_prepare_dataset {action:"prepare"} with name, items: [{path, caption?}, ...]
and a defaultCaption.
ohwx, zxc_person), NOT a
real word. Use it as defaultCaption and pass it as trigger to train_start.ohwx person sitting in a cafe, laughing, natural light. Keep them short and factual. When in doubt, the trigger word alone
(defaultCaption) is a workable baseline.img_00001.<ext> etc. Source files are never modified.| Param | Default | When to change |
|---|---|---|
| steps | 2000 | 200 for a smoke test; 1500–3000 real runs. More ≠ better (overbake = plasticky). |
| lr | 1e-4 | 5e-5 for a tighter/subtler identity. |
| rank | 16 | 32 for very detailed characters. |
| resolution | [512,768,1024] | [512] if VRAM-constrained. |
| quantize | true | Keep true on 24GB. |
| saveEvery / sampleEvery | 250 | Lower (100) to watch early progress. |
train_start {action:"status"}'s progress.samples are host paths. Look at them.
(ai-toolkit prints no saved-sample lines, so they populate at finalize from the output
dir; mid-run you can look directly in the job's output/<name>/samples/ folder.)
Identity should be recognizable by ~1/3 of the run; if samples stay generic past
halfway, the run will likely underfit. Cancel (train_start {action:"cancel", id}) and
check captions and trigger.saveEvery steps under the job's output/ dir, so a cancelled
run isn't a total loss.no_docker / no_image from train_start {action:"start"}: run
train_doctor {action:"doctor"}, follow its hints.resolution to [512], keep quantize:true,
batch stays 1.handoff failed in job error: training itself finished; the LoRA is still under the
job's output/<name>/ dir. Copy it into models/loras/ manually and upsert the catalog.packs/ and observed renders; not a vendor prompting guide.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub artokun/comfyui-mcp --plugin comfy42 skills in this plugin
/ai-toolkit-trainerTrain 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./anima-baseAnime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags + natural language; runs/trains on <6GB VRAM; includes anime inpainting via Anima-LLLite ControlNet/anima-lora-trainerTrain a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM, character/style LoRAs; covers setup, dataset prep, training params, and using the result in the anima-base workflow/civitaiDiscover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a checkpoint/LoRA/embedding on Civitai, download it into ComfyUI, and use its trigger words. Optionally pair the official Civitai MCP for community features (images browsing, posting, collections)./color-correctionDiagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white points, contrast, saturation, clipping, cast) instead of eyeballing a contact sheet. Covers the "washed out" signature, why reference color-match (mkl/ColorMatch/ColorMatchAdobe) CAN'T add contrast a flat source lacks, the levels/contrast-stretch fix (core AdjustContrast / CurveEditor), the measure→fix→re-measure loop, the side-by-side sandbox pattern, and where to place the fix in a render graph (after decode, before save). Use when a render looks washed out / flat / dull / over-saturated / color-cast, or when deciding between a color-match and a contrast/levels fix./comfyui-coreCore ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usageOther plugins' skills for the same job