Agent skill

Anima Lora Trainer

by artokun in artokun/comfyui-mcp

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…

MITAuto-check passedAI & LLM Engineering

Install Anima Lora Trainer

skills CLI
$ npx skills add artokun/comfyui-mcp --skill anima-lora-trainer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install artokun/comfyui-mcp anima-lora-trainer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/artokun/comfyui-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/anima-lora-trainer .claude/skills/anima-lora-trainer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
anima-lora-trainer
GitHub stars
803
Token cost
~2.2k tokens
SKILL.md length
832 words
Files
1
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 6 steps: Ensures Git and Python 3.10 are present… → Detects the NVIDIA GPU/driver and picks… → Clones the UI repo, patches app.py… → …
  • Tasks that involve Fine-tuning
  • SKILL.md covers Overview, Setup, Dataset preparation and Key training parameters…, plus 6 more sections
  • Calls git; reaches github.com and huggingface.co

What it does

Anima Lora Trainer is an agent skill from artokun/comfyui-mcp. 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

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Fine-tuning. It works with Gradio and Qwen. The repository describes itself as: Local-first, agent-native control plane for ComfyUI — MCP server + sidebar agent that generates images, video & audio, authors and runs workflows, and edits your live graph in… The licence is MIT.

When your agent uses it

  • Tasks that involve Fine-tuning

Example prompts

  • “/anima-lora-trainer”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  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…
  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 6ad6fc0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • huggingface.co

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Anima Lora Trainer loads about 2.2k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 832 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from artokun/comfyui-mcp at commit 6ad6fc0, republished under its MIT licence (© artokun). 832 words, ~2,231 tokens.

Download SKILL.mdSave it as .claude/skills/anima-lora-trainer/SKILL.md (or your agent's skills folder).
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 Anima LoRA Trainer

Overview

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.

  • Created by Citron Legacy; UI repo: https://github.com/citronlegacy/citron-anima-lora-trainer-ui. The Aitrepreneur adaptive installers clone the fork https://github.com/aitrepreneur/citron-anima-lora-trainer-ui.
  • Training backend: kohya-ss/sd-scripts (https://github.com/kohya-ss/sd-scripts), launched via accelerate launch.
  • Trains LoRAs for Anima DiT (Cosmos-2B). Uses Anima's own components: DiT weights + Qwen3-0.6B text encoder + Qwen-Image VAE.
  • Output: a standard .safetensors LoRA usable directly in the anima-base ComfyUI workflow.

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.

Setup

Windows

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:
    • Blackwell (RTX 50xx) → cu128, bf16
    • Modern (RTX 20/30/40, etc.) → cu128/cu126/cu118 by driver, bf16 (fp16 on Turing)
    • Pascal/Maxwell (GTX 10/9xx) → cu126/cu118, fp16
    • Kepler/older → unsupported
  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/...:
    • dit/anima-base-v1.0.safetensors (~4GB)
    • text_encoder/qwen_3_06b_base.safetensors (~1.19GB)
    • vae/qwen_image_vae.safetensors (~254MB)
  6. Writes and launches run_anima_base_windows.bat.
RunPod / Linux

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).

Launch

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).

Dataset preparation

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
  ...
  • Accepted images: .jpg .jpeg .png .webp .bmp .gif.
  • Captions are Danbooru-style tags / natural language (same prompt style as Anima generation). The trainer warns about any image missing a .txt.
  • caption_extension = .txt; shuffle_caption = false; caption_dropout_rate default 0.1 (set per dataset).

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/.

Key training parameters (defaults from app.py)

Basic
ParamDefaultNotes
project_namemy_loraalso the output_name of the LoRA
base_modelanima-base-v1.0dropdown: anima-preview, anima-preview2, anima-preview3-base, anima-base-v1.0 (installer patches default to anima-preview3-base)
network_dim32LoRA rank
network_alpha32
learning_rate1e-4
max_train_epochs10
resolution768px; dataset bucketing 256–4096, step 64
repeats10per-image repeats
caption_dropout0.1
Show full SKILL.md (387 more words)Show less
Advanced
ParamDefaultNotes
optimizer_typeAdamW8bitchoices: AdamW8bit, AdamW, Lion, SGD, Prodigy; optimizer_args = ["weight_decay=0.1", "betas=[0.9, 0.99]"]
lr_schedulercosine_with_restarts+ cosine, linear, constant, constant_with_warmup, polynomial
lr_scheduler_num_cycles1
lr_warmup_steps100
train_batch_size1
gradient_accumulation_steps1
max_grad_norm1.0
save_every_n_epochs1
save_last_n_epochs4keep last N checkpoints
mixed_precisionbf16installer overrides to fp16 on older GPUs
gradient_checkpointingtruememory saver
seed42
noise_offset0.03
multires_noise_discount0.3
timestep_samplingsigmoid+ uniform, logit_normal
discrete_flow_shift1.0flow-matching shift
cache_latentstrue
cache_text_encoder_outputstrue
vae_chunk_size64
vae_disable_cachetrue
num_cpu_threads_per_process1

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).

Generated config files

configs/<project>_training_<timestamp>.toml references the DiT (pretrained_model_name_or_path), qwen3 text encoder, and vae paths from models/anima/, plus all params above.

configs/<project>_dataset_<timestamp>.toml:

toml
[general]
resolution = 768
enable_bucket = true
bucket_no_upscale = false
bucket_reso_steps = 64
min_bucket_reso = 256
max_bucket_reso = 4096

[[datasets]]
resolution = 768
[[datasets.subsets]]
num_repeats = 10
image_dir = "/path/to/my_dataset"
caption_extension = ".txt"
caption_dropout_rate = 0.1

The sd-scripts command

"Start Training" runs the following and streams logs live to the UI and to logs/<project>_<timestamp>.log:

bash
accelerate launch \
  --config_file app_configs/accelerate_gpu.yaml \
  --num_cpu_threads_per_process 1 \
  --gpu_ids 0 \
  sd-scripts/anima_train_network.py \
  --config_file  configs/<project>_training_<timestamp>.toml \
  --dataset_config configs/<project>_dataset_<timestamp>.toml

accelerate_gpu.yaml pins use_cpu: false, mixed_precision: <bf16|fp16>, single process/machine. CUDA_VISIBLE_DEVICES is set to the selected GPU index.

Output & using the LoRA

  • The trained LoRA is saved to your Output Directory as <project_name>.safetensors, plus per-epoch checkpoints (the last save_last_n_epochs are kept).
  • Copy it into ComfyUI models/loras/ and load it in the anima-base workflow via LoraLoaderModelOnly (or rgthree Power Lora Loader):
    json
    { "class_type": "LoraLoaderModelOnly",
      "inputs": { "model": ["<unet>", 0], "lora_name": "<project_name>.safetensors", "strength_model": 1.0 } }
  • Use the same prompt style you captioned with. Typical strength 0.7 to 1.0; stack with the turbo LoRA for fast 12-step generation.

VRAM & tips

  • Defaults train on ~6GB VRAM (network_dim 32, res 768, batch 1, gradient checkpointing + latent/TE caching).
  • On OOM, the trainer suggests network_dim=8 and/or resolution=512. Also keep batch 1 and use AdamW8bit.
  • A GTX 1060 6GB works but is slow; 3GB cards are not realistic. GPUs older than Pascal are unsupported.
  • Step count rule of thumb: images × repeats × epochs / (batch × grad_accum). The UI prints the exact estimate before you train.
  • Logs stream to the UI and logs/. Training config and last paths persist in config.json so you can re-run.

Unverified / verify before relying

  • sd-scripts/anima_train_network.py and networks.lora_anima come from the kohya fork pulled at install time. app.py expects them, but they are not in the local downloaded files here.
  • The exact LoRA output filename is <project_name>.safetensors per output_name; confirm in your Output Directory after a run.

Sources

© artokun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugin/skills/anima-lora-trainer of artokun/comfyui-mcp.

Open the folder on GitHubat commit 6ad6fc0

Compare with similar skills

Anima Lora Trainer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Anima Lora Trainer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Anima Lora Trainer this skillartokun/comfyui-mcp803—~2.2kAutomated safety check: PassMIT
Huggingface Lora Space Buildersickn33/agentic-awesome-skills47k1 repos~8.3kAutomated safety check: PassApache-2.0
Fix Art IssuesOpenPipe/ART11k—~840Automated safety check: NotesApache-2.0
LoRA Space Builderhuggingface/skills11k2 repos~8.4kAutomated safety check: PassApache-2.0
Implementing LLMs LitgptOrchestra-Research/AI-Research-SKILLs13k2 repos~2.8kAutomated safety check: PassMIT
Tinker Training Costsundial-org/skills153—~1.2kAutomated safety check: PassNone

Similar skills

  • Huggingface Lora Space Builder

    sickn33/agentic-awesome-skills

    Build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA.

    47k GitHub starsUsed in 1 repo~8.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Fix Art Issues

    OpenPipe/ART

    Fix a GitHub issue on OpenPipe/ART and open a PR. An agent skill from OpenPipe/ART.

    11k GitHub stars~840 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • LoRA Space Builder

    huggingface/skills

    Official

    Builds and publishes a Gradio demo on Hugging Face Spaces for a LoRA, with the pipeline, UI and settings chosen to match that LoRA's task and model card.

    11k GitHub starsUsed in 2 repos~8.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Implementing LLMs Litgpt

    Orchestra-Research/AI-Research-SKILLs

    Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral).

    13k GitHub starsUsed in 2 repos~2.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Tinker Training Cost

    sundial-org/skills

    Calculate training costs for Tinker fine-tuning jobs. An agent skill from sundial-org/skills.

    153 GitHub stars~1.2k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Flux2 Lora Training

    AnastasiyaW/codex-claude-code-config

    Plan or review LoRA and edit-training work specifically for FLUX.2 Klein or Qwen-Image-Edit, including paired datasets, trainer-version contracts, and held-out fidelity checks.

    154 GitHub stars~4.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from artokun/comfyui-mcp

All 42 skills in this repo
  • AI Toolkit Trainer

    artokun/comfyui-mcp

    Train custom LoRAs with ostris AI-Toolkit. An agent skill from artokun/comfyui-mcp.

    803 GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed
  • Anima Base

    artokun/comfyui-mcp

    Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT).

    803 GitHub stars~4k tokensUpdated 5 days ago
    Auto-check passed
  • Civitai

    artokun/comfyui-mcp

    Discover Civitai models with the BUILT-IN downloadmodel action:"searchcivitai" and install/generate them locally.

    803 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • Color Correction

    artokun/comfyui-mcp

    Diagnose and fix video/image color OBJECTIVELY with the getimage (action:"analyzecolor") tool (scopes/stats such as black/white points, contrast, saturation, clipping, cast) instead of eyeballing a…

    803 GitHub stars~2.4k tokensUpdated 5 days ago
    Auto-check passed
  • Comfyui Frontend Extensions

    artokun/comfyui-mcp

    Authoring ComfyUI v2 frontend extensions with @comfyorg/extension-api, covering defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles.

    803 GitHub stars~5.4k tokensUpdated 5 days ago
    Auto-check passed
  • Comfyui Launch Flags

    artokun/comfyui-mcp

    Pick the right ComfyUI startup flags for VRAM, attention, caching, and speed.

    803 GitHub stars~3.1k tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Anima Lora Trainer

What does Anima Lora Trainer do?

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…. Anima Lora Trainer is an agent skill from artokun/comfyui-mcp.

When should I use Anima Lora Trainer?

Anima Lora Trainer fits situations like: tasks that involve Fine-tuning.

How do I install Anima Lora Trainer in Claude Code?

Run `npx skills add artokun/comfyui-mcp --skill anima-lora-trainer -a claude-code`. Or copy the skill folder (plugin/skills/anima-lora-trainer in artokun/comfyui-mcp) into .claude/skills/anima-lora-trainer in your project. Claude Code loads it when a task matches its description.

How do I install Anima Lora Trainer in Codex?

Run `npx skills add artokun/comfyui-mcp --skill anima-lora-trainer -a codex`. Or copy the skill folder (plugin/skills/anima-lora-trainer in artokun/comfyui-mcp) into .agents/skills/anima-lora-trainer in your project. Codex loads it when a task matches its description.

Can I use Anima Lora Trainer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add artokun/comfyui-mcp --skill anima-lora-trainer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/anima-lora-trainer, .gemini/skills/anima-lora-trainer, .github/skills/anima-lora-trainer and .opencode/skills/anima-lora-trainer in your project.

What does Anima Lora Trainer need to run?

Going by SKILL.md and its folder, Anima Lora Trainer needs the command-line tools its instructions call (git). Our summary lists: Python 3.

Does Anima Lora Trainer access the network?

SKILL.md names 2 domains. In commands or code: github.com and huggingface.co; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Anima Lora Trainer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Anima Lora Trainer use?

Anima Lora Trainer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Anima Lora Trainer use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Anima Lora Trainer?

Skills that share tags, products or a category with Anima Lora Trainer: Huggingface Lora Space Builder (sickn33/agentic-awesome-skills, 47k stars), Fix Art Issues (OpenPipe/ART, 11k stars), LoRA Space Builder (huggingface/skills, 11k stars) and Implementing LLMs Litgpt (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Anima Lora Trainer?

artokun (a GitHub user) maintains it in artokun/comfyui-mcp, which has 803 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on October 5, 2026.

Source: artokun/comfyui-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.