DEV Community

AI-KSK
AI-KSK

Posted on

Anima LoRA Batch Factory: ComfyUI Front-End, sd-scripts Training, Gemma 3 Auto-Tagging

Training a character LoRA should not mean writing a TOML by hand. This episode's plugin wires ComfyUI to sd-scripts and turns it into a batch queue: drop a folder of images, get auto-tagged, auto-trained LoRAs, one per character, all from one run. This episode shipped no workflow JSON, so the numbers below are the settings the author shows and states in the video.

Evidence note: no workflow JSON was shipped with this episode. Everything numeric below is the author's stated configuration in the video; nothing is inferred from a graph file.

When to use it

  • You have a stack of characters and want one LoRA per character without hand-writing configs.
  • You want auto-tagging that already speaks Anima's tag-plus-natural-language dialect.
  • You are training on rented GPUs and want a self-starting image.

What is different in this workflow

  • Batch, not single: each sub-folder under train/ is one character; the folder name becomes the trigger word.
  • Queued training: up to ~20 character folders, trained one after another.
  • Gemma 3 does the tagging, not Gemma 4 - the author tried 4 first and found it too slow; 3 is fast and uncensored enough once tuned.
  • Anima-specific tagging: the rules are pre-baked into the llama.cpp VLM node so output matches Anima's mixed tag + natural-language training style.
  • A second graph tests the result: refresh node definitions, load the new LoRA, prompt, run.

Step by step

  1. Deploy the mirror, open ComfyUI, pick the first graph (batch training).
  2. File manager -> train folder -> create a new folder named after the trigger word.
  3. Upload the character's image set into that folder. Repeat for each character; keep under ~20.
  4. Run. Tagging and training happen in one pass; watch the built-in progress bar.
  5. Output lands in ComfyUI/models/loras/anima_lora/.
  6. Switch to the second graph, click refresh, apply the new LoRA, prompt, run to test.
  7. If a folder's subdirectories hold more than 2048 images, raise the image cap before training.

Parameter basis

  • No JSON, so these are the author's stated values: 3000 steps per LoRA by default (2000-3000 is his range), 10 epochs, save every N epochs adjustable, resolution 1024x1024, batch size 1, learning rate 2e-5 (default 1e-4, he calls 2e-5 gentler), repeats computed automatically from the step target.
  • Runtime he reports: ~30 minutes for 3000 steps, ~20 minutes for 2000.
  • Batch size guidance: 1 for character detail; 5-10 for style LoRAs.
  • Tagging model: Gemma 3 via a llama.cpp VLM node; trigger word prefixed in the caption.
  • Dataset size: 20 images described as a good starting point.

Limits

  • No workflow JSON in the episode, so the exact node graph cannot be audited here.
  • The training resolution, LR and step count are the author's experience, not a benchmarked optimum.
  • His own note on the captioning: he should have used a two-word trigger (Rebecca girl) rather than a single name.
  • Style LoRAs need a much larger batch size than character LoRAs, so the defaults are character-first.

Episode resources

Top comments (0)