ai-toolkit-trainer
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…
Train 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
$ npx -y skills add artokun/comfyui-mcp --skill anima-lora-trainer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/anima-lora-trainerContext preview
The summary Claude sees to decide when to auto-load this skill.
Train 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
name: anima-lora-trainer description: Train 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 globs: - "**/*.py" - "**/*.toml" - "**/*.json"
Citron's Anima LoRA Trainer (`app.py`, titled "Citron's Anima LoRA Trainer" in the UI) is a local Gradio UI for training LoRA adapters on the Anima diffusion model using kohya-ss/sd-scripts. It trains on ~6GB VRAM with the default settings, the same low-VRAM profile as Anima generation.
> The network module is `networks.lora_anima` and the training script is `sd-scripts/anima_train_network.py` (an Anima-specific kohya script the installer expects). Confirm these exist after the installer's `git clone` of sd-scripts. `app.py` references them, but they are pulled from the upstream repo at install time.
Run `CITRON_ANIMA_LORA_TRAINER-V2.bat`. It: 1. Ensures Git and Python 3.10 are present (via winget if missing). 2. Detects the NVIDIA GPU/driver and picks a matching PyTorch CUDA wheel automatically:
3. Clones the UI repo, patches `app.py` defaults (`base_model` → `anima-preview3-base`, `mixed_precision` → detected value), writes `app_configs/accelerate_gpu.yaml`. 4. Creates `.venv`, installs PyTorch, clones and installs `sd-scripts`, installs app `requirements.txt`. 5. Downloads models into `models/anima/{dit,text_encoder,vae}/` from `https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/...`:
6. Writes and launches `run_anima_base_windows.bat`.
Run `CITRON_ANIMA_LORA_TRAINER-RUNPOD-V2.sh`. Same flow into `/workspace/citron-anima-lora-trainer-ui`; it patches `server_name` to `0.0.0.0`. Expose HTTP port 7860 and open `Connect → HTTP Service 7860` (or `https://${RUNPOD_POD_ID}-7860.proxy.runpod.net`).
`app.py` runs Gradio on `0.0.0.0:7860`, so open http://127.0.0.1:7860. Re-launch later with `run_anima_base_windows.bat` (Win) or `./run_anima_base_runpod.sh` (RunPod). The DiT base model auto-downloads on the first "Start Training" if not already present (uses `wget`).
A flat folder of images, each with a matching `.txt` caption of the same basename (image-side captioning, kohya style):
my_dataset/ 001.png 001.txt 002.jpg 002.txt ...
The UI tab "Training" takes Image Directory (the flat folder above) and Output Directory (where the LoRA is saved). "Configure Training" validates the dataset, prints a step estimate (`steps_per_epoch = ceil(images × repeats / (batch × grad_accum))`, `total = spe × epochs`), then writes two TOMLs into `configs/`.
| Param | Default | Notes | |-------|---------|-------| | project_name | `my_lora` | also the `output_name` of the LoRA | | base_model | `anima-base-v1.0` | dropdown: `anima-preview`, `anima-preview2`, `anima-preview3-base`, `anima-base-v1.0` (installer patches default to `anima-preview3-base`) | | network_dim | `32` | LoRA rank | | network_alpha | `32` | | | learning_rate | `1e-4` | | | max_train_epochs | `10` | | | resolution | `768` | px; dataset bucketing 256–4096, step 64 | | repeats | `10` | per-image repeats | | caption_dropout | `0.1` | |
| Param | Default | Notes | |-------|---------|-------| | optimizer_type | `AdamW8bit` | choices: AdamW8bit, AdamW, Lion, SGD, Prodigy; `optimizer_args = ["weight_decay=0.1", "betas=[0.9, 0.99]"]` | | lr_scheduler | `cosine_with_restarts` | + cosine, linear, constant, constant_with_warmup, polynomial | | lr_scheduler_num_cycles | `1` | | | lr_warmup_steps | `100` | | | train_batch_size | `1` | | | gradient_accumulation_steps | `1` | | | max_grad_norm | `1.0` | | | save_every_n_epochs | `1` | | | save_last_n_epochs | `4` | keep last N checkpoints | | mixed_precision | `bf16` | installer overrides to fp16 on older GPUs | | gradient_checkpointing | `true` | memory saver | | seed | `42` | | | noise_offset | `0.03` | | | multires_noise_discount | `0.3` | | | timestep_sampling | `sigmoid` | + uniform, logit_normal | | discrete_flow_shift | `1.0` | flow-matching shift | | cache_latents | `true` | | | cache_text_encoder_outputs | `true` | | | vae_chunk_size | `64` | | | vae_disable_cache | `true` | | | num_cpu_threads_per_process | `1` | |
Fixed in the generated training TOML (not exposed): `network_module = networks.lora_anima`, `network_train_unet_only = true`, `qwen3_max_token_length = 512`, `t5_max_token_length = 512`, `save_model_as = safetensors`, `save_precision = bf16` (fp16 on older GPUs).
`configs/<project>_tr
This project is no longer maintained. ComfyUI now ships official agent and MCP tooling — Comfy Agent and Comfy MCP — built and supported by the Comfy-Org team with deeper integration than a community project can match.
Repo: artokun/comfyui-mcp
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…
Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags + natural language;…
Discover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a checkpoint/LoRA/embedding on…
Diagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white points, contrast, saturation,…
Core ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usage
Authoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands,…