flux2-lora-training

flux2-lora-training is a skill for Claude Code from AnastasiyaW/codex-claude-code-config. It costs 73 tokens per session (5,346 once invoked), scanned A, original, MIT.

A reference guide for training LoRA add-ons for FLUX.2 Klein and Qwen Image Edit models. LoRAs are smaller trained files that teach an existing image model a particular visual subject, style, or editing behavior.

In plain words
What is it for?
Use it when training LoRAs for image editing, inpainting, head or face swaps, and other before-and-after transformations. It covers the relevant model architecture, reference images, resolution handling, and latent representation.
Why use it?
It gathers model details and training guidance needed for image-editing and larger-resolution work. It also explains compatibility limits, such as why FLUX.1 LoRAs cannot be used with FLUX.2 Klein.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-code-config plugin — 57 skills, 8 agents shipped together

Good fit Use it when training LoRAs for image editing, inpainting, head or face swaps, and other before-and-after transformations. It covers the relevant model architecture, reference images, resolution handling, and latent representation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anastasiyaw/codex-claude-code-config/flux2-lora-training
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AnastasiyaW/codex-claude-code-config --skill flux2-lora-training
Clone the repo
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config

Made for: Claude Code.

Or install claude-code-config, the plugin that ships this one along with the rest of its 57 skills, 8 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flux2-lora-training

README.md
[![agentmods](https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/flux2-lora-training/github.svg)](https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/flux2-lora-training)
Your own site
<a href="https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/flux2-lora-training"><img src="https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/flux2-lora-training/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flux2-lora-training

Your own site · 80×15
<a href="https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/flux2-lora-training"><img src="https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/flux2-lora-training.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,346 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 15
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.05346
Opus 5 $0.00036 $0.02673
Sonnet 5 $0.00015 $0.01069
Haiku 4.5 $0.00007 $0.00535

Measured 2d ago against content hash 5f09f1e6d652, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

flux2-lora-training scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ai-ml/flux2-lora-training/SKILL.md · 422 lines

How it starts

The opening of the file, as written. The whole thing — 422 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FLUX.2 Klein 9B — LoRA Training Reference

Evidence boundary

This file is a route to evaluate a training plan, not a tested recipe. Model cards establish model identity and license; trainer repositories establish only the behavior of their pinned version. Numeric settings and BFS notes below are historical local experiment candidates unless an exact source is linked. Before training, record the model revision, trainer commit, dataset contract, hardware, and a small held-out acceptance set. Do not promote a historical score, memory estimate, slot order, or private result into a universal default.

Архитектура моделей

FLUX.2 Klein — Rectified Flow Transformer (DiT)

Параметр Klein 9B Klein 4B Qwen-Image-Edit FLUX.1 dev
Blocks 32 (8+24) 25 (5+20) 60 (MM-DiT) 56 (8+48)
Embedding dim 12,288 7,680 15,360
VAE latent channels 32 (128 packed features) 32 (128 packed features) verify the exact revision 16
Text encoder Qwen3 (bundled) Qwen3 Qwen2.5-VL (7B) Mistral-Small-3.1
Guidance embeddings НЕТ НЕТ Есть
Total params 9B 4B 20B DiT + 7B VL 12B

FLUX.2 Klein VAE: AutoencoderKLFlux2, 32 latent channels (FLUX.1: 16) → после 2×2 patch packing в трансформере: 32×4 = 128 dims per token, 16× spatial compression. Несовместим с FLUX.1 LoRA — другой VAE, другой latent space. Tiling для больших разрешений: 1024px тайлы с 25% overlap, обрабатывает произвольное разрешение.

Klein editing механизм (Kontext-style): reference image VAE-кодируется и конкатенируется с noise latent вдоль sequence dim. Positional embeddings разделяют reference и output через 3D RoPE time offsets (ref1=t:1, ref2=t:2, output=t:0). Поддерживает до 10 reference images теоретически, обучен на 2.

Text encoder Klein: Qwen3 (встроен в 9B), выходы из слоёв 9, 18, 27.

Do not assume a trainer’s flux_guidance_* fields are no-ops or active from their names. Verify their behavior against the pinned trainer release and the selected model before relying on them.

Read the full file on GitHub · 422 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +13 lines · -169 tokens per session 5f09f1e6d652
  2. 10d ago First seen · 409 lines · 242 tokens per session scan A 1cb659c0702e

Subscribe to this mod's changes

flux2-lora-training is a skill published in the GitHub repository AnastasiyaW/codex-claude-code-config (149 stars, last pushed yesterday), licensed MIT. It adds 73 tokens to every session and 5,346 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.