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, или любые вопросы об обучении диффузионных моделей. ВСЕГДА используй этот скилл.

AI & Automation 126 stars 19 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
70
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
2 months ago
Last Updated
2 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

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.

126 Updated 2 days ago
AnastasiyaW
AI & Automation Listed

vlm-segmentation-engineering

Экспертный скилл по прикладной инженерии VLM, сегментационных моделей и диффузионных архитектур для GPU-деплоя. Используй ВСЕГДА когда речь идёт о: SAM2, SAM3, Florence-2, LLaVA, Grounding DINO, OWLv2, YOLO-World, EdgeTAM — выбор модели, интеграция, pipeline, код; диффузионных моделях — UNet/DiT/Flow/Flux, schedulers, LoRA, AMP, ZeRO/FSDP, text encoders (CLIP/Qwen), VAE, CFG; GPU-деплое — MIG, MPS, torch.compile, TorchAO, Triton, memory optimization, два инстанса на H100; open-vocab сегментации и phrase grounding; part-level labeling и instance masks из текстового промпта; замене/fusion текст-энкодеров; fine-tune/LoRA/DreamBooth диффузионных моделей. Триггеры: SAM, Florence, LLaVA, Grounding DINO, YOLO-World, diffusion, UNet, DiT, Flux, LoRA, scheduler, guidance_scale, VAE, CLIP embeddings, Qwen embedder, MIG, MPS, TorchAO, Triton inference, сегментация по тексту, instance masks, open-vocab detection, text-conditioned segmentation.

126 Updated 2 days ago
AnastasiyaW
AI & Automation Listed

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.

126 Updated 2 days ago
AnastasiyaW