lora-training

Installation
SKILL.md

lora-training

Train with ostris/ai-toolkit (MIT, https://github.com/ostris/ai-toolkit). It is an external install that the user does on the training machine. This skill never installs or runs it for them. The design follows agentY's lora-training skill (MIT, copied to references/agentY-lora-training.md; its tool names are agentY-specific). Use open-weights base models only.

0. Should this be a LoRA?

Only when an identity, style, product or motion has to come back reliably across many prompts. For a single look, use a reference image with image-edit (Qwen edit) or fix.edit instead. It is cheaper and needs no training.

1. Build the dataset (scripts/dataset_check.py)

python scripts/dataset_check.py <folder> --kind character|product|style|motion [--trigger tok]. It is stdlib only and reads nothing over the network. It checks:

  • the item count against the targets (character 15–40, product 15–30, style 25–60, motion 10–30 clips of 2–5 s)
  • for each item, a matching <name>.txt caption
  • exact duplicates (by sha256) and empty captions
  • tiny images (PNG/JPEG headers are read for the size)
  • whether a caption contains the trigger word, which it should not, because the trainer prepends it

It writes dataset.json (items, warnings and a sha256 of the whole set) and prints the warnings.

Captions describe what should stay changeable: setting, pose, clothes, light, camera, motion. They do not describe what the LoRA must learn (the face, the product's shape, the style's look). Write natural sentences for FLUX.2, Qwen and Z-Image. For video, write subject, action and camera move in one paragraph.

Installs
73
GitHub Stars
49
First Seen
Nov 1, 2026