Logo di Lora Training

Lora Training

Community
mojomast
lora-training

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.

Panoramica

Pubblicato damojomast
Repositoryopen-higgsfield-skills
Nome della skilllora-training
Stelle
97
Fork
19
File inclusi
3
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 3

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da mojomast su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Lora Training in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/mojomast/open-higgsfield-skills/tree/main/skills/lora-training
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mojomast/open-higgsfield-skills.git /tmp/open-higgsfield-skills
mkdir -p .claude/skills
cp -r /tmp/open-higgsfield-skills/skills/lora-training .claude/skills/lora-training
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Lora Training in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Lora Training non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Lora Training non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.
presetstepsranklrVRAM (unverified)base weights license
flux2_klein_4b2000161e-4~16–24 GBcheck the model card (unverified)
qwen_image2500161e-4~24 GB+Apache-2.0 (unverified)
wan22_14b2000321e-424–48 GBApache-2.0 (unverified)
ltx22000321e-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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Lora Training?

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.

Perché usare Lora Training su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Lora Training è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Lora Training in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/mojomast/open-higgsfield-skills/tree/main/skills/lora-training. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Lora Training?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Lora Training?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Lora Training: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Lora Training è gratuita?

È pubblicata su GitHub da mojomast. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇