Przejdź do treści
Biblioteka skilli
AI i agenci · Budowanie i kod

lora-training

/lora-training

Trenuje LoRA postaci, produktu lub stylu dla otwartego modelu obrazu lub wideo, po zatwierdzeniu zbioru danych przez człowieka.

Licencja
MIT
Ostatnia zmiana repozytorium
30.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
2
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 30.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/aitoolkit_config.py, scripts/dataset_check.py

Co robi i kiedy

Trenuje LoRA postaci, produktu lub stylu dla otwartego modelu obrazu lub wideo, po zatwierdzeniu zbioru danych przez człowieka.

Wyzwalacze z opisu

train a LoRA of my productmake a style LoRAteach the model this character
Oryginalny opis (EN)

Train a LoRA (character, product, style or motion) for an open-weights image or video model with ostris/ai-toolkit, behind a hard human approval gate on the dataset. Use for "train a LoRA of my product", "make a style LoRA", "teach the model this character". Nothing trains until the user approves the dataset.

Jak działa

  1. 0. Should this be a LoRA?
  2. 1. Build the dataset (scripts/datasetcheck.py)
  3. 2. Gate: the user approves the dataset (hard)
  4. 3. Config and command (scripts/aitoolkitconfig.py)
  5. 4. Test
Sekcje z nagłówków SKILL.md, w oryginale · 47 linii, 603 słów
Podgląd SKILL.md
---
name: lora-training
description: Train a LoRA (character, product, style or motion) for an open-weights image or video model with ostris/ai-toolkit, behind a hard human approval gate on the dataset. Use for "train a LoRA of my product", "make a style LoRA", "teach the model this character". Nothing trains until the user approves the dataset.
---

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

## 2. Gate: the user approves the dataset (hard)
Show the user a contact sheet (`ffmpeg -pattern_type glob -i '<folder>/*.png' -vf tile=6x6,scale=1600:-1 sheet.png`) plus the trigger word and the warnings. **End your turn and wait.** Never approve on the user's behalf.
- When the user says yes: `python scripts/dataset_check.py <folder> --approve "<their words>"` writes `APPROVED.json` with the dataset hash.
- If any file changes after that, the hash no longer matches and the approval is void.

## 3. Config and command (`scripts/aitoolkit_config.py`)
`python scripts/aitoolkit_config.py <folder> --model flux2_klein_4b|qwen_image|wan22_14b|ltx2 --trigger tok --out train.yaml`
- It **refuses** to run without a valid `APPROVED.json` whose hash matches the current files.
- It writes an ai-toolkit-style YAML with the preset steps, rank and learning rate, and prints the command (`python run.py train.yaml` inside the user's ai-toolkit checkout). It does not run the command.
- The presets are starting points and are **unverified**. Check the field names against the ai-toolkit `config/examples/` for the version the user has installed.

| preset | steps | rank | lr | VRAM (unverified) | base weights license |
|---|---|---|---|---|---|
| flux2_klein_4b | 2000 | 16 | 1e-4 | ~16–24 GB | check the model card (unverified) |
| qwen_image | 2500 | 16 | 1e-4 | ~24 GB+ | Apache-2.0 (unverified) |
| wan22_14b | 2000 | 32 | 1e-4 | 24–48 GB | Apache-2.0 (unverified) |
| ltx2 | 2000 | 32 | 1e-4 | ~32 GB INT8 (agentY notes this is uncertain) | Lightricks LTX-2 license (not OSI) |

Training occupies the GPU for minutes to hours. On Google Colab it spends compute units, so **ask before starting** and show the estimate.

## 4. Test
Copy the LoRA to `ComfyUI/models/loras/`. Render the same prompts and seed at strength 0, 0.8 and 1.0 using the base model's usual graph (for example `flux3-klein-stills`), then judge them with `still-qa`.
- **Under-trained:** the trigger word does nothing.
- **Overfit:** the subject appears without the trigger word, or the training backgrounds repeat. Use an earlier checkpoint or fewer steps.

Register the result in the video-director manifest's `bible.cast[].lora`. Note that this field is free text in `log`, not part of the schema.
Pliki w paczce (4)
  • SKILL.md 4 KB
  • references/agentY-lora-training.md 7 KB
  • scripts/aitoolkit_config.py 4 KB
  • scripts/dataset_check.py 4 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · mojomast/open-higgsfield-skills100MIT
runcomfy-com/skills90MIT

Migawka bazy z 13.11.2026 · wersja paczki db3b1eb0949e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90train-character-lora
    Trenuje lokalnie LoRA postaci lub tożsamości na FLUX.1-dev przez narzędzia train_* comfyui-mcp na GPU w Dockerze: przygotowanie zbioru, start, monitoring i użycie wyniku w ComfyUI.
  • 100fal-train
    Trenuje własne modele AI (LoRA) na fal.ai, personalizując generowanie obrazów lub wideo dla określonych osób, stylów i obiektów.
  • 98ai-toolkit-trainer
    Trenuje własne LoRA za pomocą ostris AI-Toolkit dla WAN 2.2 i 2.1 oraz Z-Image: konfiguracja lokalna i RunPod, przygotowanie zbioru, kluczowe parametry i użycie w ComfyUI.
  • 100scenario-model-training
    Prowadzi trenowanie własnych modeli w Scenario przez MCP, gdy referencje przestają wystarczać: LoRA, klonowanie głosu, dobór datasetu i modelu bazowego, epoki, koszt i diagnoza utraty tożsamości.
  • 90character-lora
    Prowadzi budowę LoRA o spójnej tożsamości dla oryginalnej postaci: definicja postaci, zbiór wielokątowy, opisy, trening na lokalnym GPU i gotowy model.
  • 100layer-reference-sets
    Trenuje własny styl lub LoRA na grafikach studia, tak by wygląd utrzymał się w wielu generacjach, i dobiera zestaw referencji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.