lora-training
Train a LoRA for an image or video model - a person, pet, product, style or motion - with the agent doing every preparation step and the USER approving the…
от szprivate★ 53 звезды на GitHub
Установить lora-training в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
LoRA training: dataset -> the user's approval -> training -> test
Training is the last step of a long preparation. The tools do the preparation; the user's approval of the
dataset is a hard gate (train_lora refuses an unapproved dataset, and one edited after approval). Never
approve on the user's behalf, never start training "to save time".
0. Should it be a LoRA at all?
A LoRA is for an identity, style, product or motion that must come back reliably across many prompts. For one picture's look, or a one-off, reference images / an edit model / IP-Adapter is cheaper and faster. Say so if the request is really that, and let the user choose.
1. Choose the model and the backend
lora_training_status() (no job) lists the presets (steps, rank, VRAM need, caption style), the installed
backends and the GPU. Pick by what the user will render with:
| model | backend | notes |
|---|---|---|
z_image, flux2_klein_4b/9b, qwen_image, flux1_dev, sdxl, sd15 |
ai-toolkit (default) or musubi |
image; ai-toolkit downloads the base model from Hugging Face on first use (say the size, ask) |
wan22_t2v_14b, wan22_5b, ltx2 |
ai-toolkit (musubi for Wan) |
video: needs CLIPS, not pictures; LTX needs ~32 GB INT8 (uncertain: the preset says so) |
flux2_dev, wan22_image |
fal (hosted, costs money) or a big card |
flux2_dev locally wants 48 GB |
LTX's official trainer (Lightricks/LTX-2 ltx-trainer) is not driven from here: Linux / WSL2 / farm only. |
||
The dataset folder this tool writes (trainer/: files + .txt captions) is what it reads. |
2. Build the dataset (lora_dataset_prepare)
Sources: the user's files / folder, canvas outputs (their file paths), web pictures only with the user's consent
(download_image first). The tool drops duplicates, blurry and tiny pictures and watermarked ones, crops to
the model's aspect buckets, cuts long clips, captions, and writes the manifest.
Size and quality per kind (fewer good beats more mediocre):
- character / pet: 15-40 pictures, varied angles, light, clothes, backgrounds; the face sharp in most. One outfit or one background in every picture bakes in. Mixed subjects (two people) ruin it: remove.
- style: 25-60 pictures of the style on DIFFERENT subjects. Same subject everywhere teaches the subject.
- product: 15-30, clean cuts from every angle, consistent branding visible, varied backgrounds.
- motion (video): 10-30 clips of the SAME motion, 2-5 s, the preset's frame count and fps, steady framing.
Read the
warningsin the result and tell the user the real ones (too few, too similar, mixed subjects).
Captions (needs_captions -> look at the pictures, write them with lora_dataset_set_captions, ids to text):
describe what is visible and should stay changeable (setting, pose, clothes, light, camera, motion); do NOT
describe what the LoRA is meant to learn (the face/body of a character, the style's look, the product's shape).
Do not write the trigger word: the trainer prepends it. Style per model is in the preset (caption_style):
Z-Image / FLUX.2 / Qwen: natural sentences; SDXL / SD1.5: short phrases; video: subject, action and camera
move in one paragraph (and the sound for LTX).
3. The review gate (lora_dataset_review)
lora_dataset_review(dataset) opens the viewer's Dataset panel (grid with captions, edit, include or drop
items, crop, bulk replace, Approve & train, Ask the agent). It returns waiting_for_user: end your turn
with one short message (what is in the set, the trigger word, the warnings). The user's approval or their note
arrives as the next message. A note ("remove the blurry ones", "rename the trigger") -> make the change
(lora_dataset_set_captions, or tell them to do it in the panel), then review again.
No viewer (Slack, Claude Desktop, MCP): the result says so; send the contact sheet (send_to_slack / the
chat) with the captions and trigger word and wait for "approve". Only then
lora_dataset_review(action="approve", user_message=<their words>).
4. Train (train_lora)
train_lora(dataset, model=..., backend=...); use dry_run=True first when anything is uncertain: it shows the
pre-flight (free GPU memory, disk - never C:, base model present, backend installed) without starting.
Local backends are installed into their own venv on the job's first stage (several GB, takes a while).
A missing base model: tell the user the size, and only with a yes pass
allow_download=True.train_lorareturns at once with a job id and refuses a repeat:already_running(a run on this dataset is still going: follow it withlora_training_status, do not start another) andalready_trained(a finished run, e.g. v3, has the same dataset, model and steps: tell the user and ask). Only on the user's explicit wish passnew_run=True. Never start a run twice because the panel looked unchanged: the Trai
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
lora_dataset_prepare - 02
lora_dataset_set_captions - 03
lora_dataset_review - 04
train_lora - 05
lora_training_status - 06
lora_training_stop - 07
show_in_viewer - 08
analyze_image - 09
view_image - 10
download_image
FAQ
Что делает скилл lora-training?
Train a LoRA for an image or video model - a person, pet, product, style or motion - with the agent doing every preparation step and the USER approving the dataset before anything trains. Use for "train a LoRA of my dog", "make a style LoRA from these pictures", "teach Wan this motion", "fine-tune Z-Image / FLUX.2 / Qwen-Image / LTX on my photos", "make a character LoRA", "is my LoRA overfitting", "stop the training", "how is the training going".
Как установить скилл lora-training?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lora-training запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
slack-gif-creator
AnthropicKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
automate-this
GitHubAnalyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
from-the-other-side-vega
GitHubPatterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
plantuml-ascii
GitHubGenerate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…