flux2-lora-training

Solid

Comprehensive reference for training LoRAs on FLUX.2 Klein 9B and Qwen Image Edit 2511 models. Use this skill whenever the user asks about: training LoRAs for flux2/flux 2 klein/qwen-image-edit, before/after edit LoRAs (head swap, face swap, image editing), inpainting LoRAs, training at larger resolutions, latent space expansion, VAE fine-tuning, multi-reference training (2 input images → 1 output), dataset preparation for edit models, zero_cond_t, ai-toolkit/SimpleTuner/DiffSynth configs, BFS head swap LoRA methodology, Qwen Edit architecture, consistency mode, dual encoding, FuseAnyPart, ACE++, maximum training resolution, или любые вопросы об обучении диффузионных моделей. ВСЕГДА используй этот скилл. Do NOT use for writing FLUX.2 Klein generation/edit prompts at inference time (use flux2-klein-prompting), nor for general non-training diffusion architecture/inference/memory work (use diffusion-engineering); this skill is about LoRA/VAE training, not prompting or serving.

AI & Automation 138 stars 20 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# FLUX.2 Klein 9B — LoRA Training Reference ## Архитектура моделей ### 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 | **128** | 128 | 16 (стандарт) | **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. **Guidance embeddings в Klein отсутствуют** — `flux_guidance_mode`/`flux_guidance_value` — no-ops. **Для LoRA тренировки: base модель** `FLUX.2-klein-base-9B`, не distilled 4...

Details

Author
AnastasiyaW
Repository
AnastasiyaW/claude-code-config
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

flux-txt2img

Build Flux txt2img workflows — Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns

450 Updated today
artokun
AI & Automation Solid

diffusion-engineering

Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Использовать при любых задачах с диффузионными моделями: проектирование или модификация архитектуры (UNet/DiT/Flow/Flux), выбор и настройка schedulers/samplers, дообучение (LoRA/DreamBooth/full fine-tune), оптимизация памяти (AMP/checkpointing/ZeRO/FSDP/quantization), замена или fusion текст-энкодеров (CLIP/Qwen), работа с Diffusers, отладка диффузионных пайплайнов, оценка качества (FID/CLIPScore/LPIPS), latent diffusion, VAE, guidance/CFG, rectified flow, Stable Diffusion, SDXL, Flux. Также применять при вопросах про GPU-память при обучении генеративных моделей, text-to-image пайплайны, ControlNet, multi-encoder fusion, WebDataset. Do NOT use for writing FLUX.2 Klein generation prompts (use flux2-klein-prompting) или для FLUX.2 Klein / Qwen-Edit LoRA-тренинга и edit-LoRA (use flux2-lora-training); это общая диффузионная инженерия, не специфика FLUX.2 Klein.

138 Updated today
AnastasiyaW
AI & Automation Solid

flux2-klein-prompting

Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create prompts for FLUX.2 [klein], generate images, edit photos with the klein model, work with multi-reference image editing, or needs templates for T2I/I2I tasks. Trigger for any mention of: FLUX.2, flux klein, BFL API, image editing prompts, text-to-image prompts for FLUX, product mockups, poster generation, UI mockups, sticker packs, character design, seamless textures, or any request to write/improve/translate prompts for FLUX-family models. Also trigger when user asks about guidance_scale, inference steps, distilled vs base modes, or multi-reference workflows. Do NOT use for training a FLUX.2 Klein / Qwen-Edit LoRA (use flux2-lora-training), nor for reconstructing a prompt FROM an existing source image (use forensic-prompt-compiler); this skill is for authoring generation/edit prompts only.

138 Updated today
AnastasiyaW