Agent skill

Diffusion Engineering

by AnastasiyaW in AnastasiyaW/codex-claude-code-config

Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти.

MITAuto-check passedAI & LLM Engineering

Install Diffusion Engineering

skills CLI
$ npx skills add AnastasiyaW/codex-claude-code-config --skill diffusion-engineering -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AnastasiyaW/codex-claude-code-config diffusion-engineering --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai-ml/diffusion-engineering .claude/skills/diffusion-engineering && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diffusion-engineering
GitHub stars
154
Token cost
~1.2k tokens
SKILL.md length
383 words
Files
7 (incl. references)
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти.

  • Works in 3 steps: Где идёт диффузия → пиксели (дорого) или… → Backbone денойзера → UNet (классика,… → Управление сэмплингом → scheduler, число…
  • Это общая диффузионная инженерия
  • SKILL.md covers Быстрая ориентация, Reference files — читать по…, Быстрый чеклист «я… and Trade-offs на один экран, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Diffusion Engineering is an agent skill from AnastasiyaW/codex-claude-code-config. Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Использовать при любых задачах с диффузионными моделями: проектирование или модификация архитектуры (UNet/DiT/Flow/Flux), выбор и настройка schedulers/samplers, дообучение (LoRA/DreamBooth/full fine-tune), оптимизация памяти (AMP/checkpointing/ZeRO/FSDP/quantization), замена или fusion текст-энкодеров (CLIP/Qwen), работа с Diffusers, отладка диффузионных пайплайнов, оценка качества (FID/CLIPScore/LPIPS), latent…

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/architectures.md`, `references/encoders-data.md` and `references/eval-debug.md`).

It sits in AI & LLM Engineering, covering Diffusion and image models and Fine-tuning. It works with Stable Diffusion and Qwen. The repository describes itself as: Claude Code, Codex, and multi-agent configuration system: principles, hooks, skills, and workflow patterns for AI-assisted development. The licence is MIT.

When your agent uses it

  • Это общая диффузионная инженерия
  • Не специфика FLUX.2 Klein

Example prompts

  • “/diffusion-engineering”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Где идёт диффузия → пиксели (дорого) или латентное пространство (LDM/SD-семейство — практично)
  2. Backbone денойзера → UNet (классика, проще) или Transformer/DiT/Flow (масштабируется лучше)
  3. Управление сэмплингом → scheduler, число шагов, guidance_scale — часто дают больше, чем правка сети

What it can do on your machine

Read from SKILL.md and the folder at commit cdcb11d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diffusion Engineering loads about 1.2k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 248 tokens; SKILL.md has 383 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~248
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AnastasiyaW/codex-claude-code-config at commit cdcb11d, republished under its MIT licence (© AnastasiyaW). 383 words, ~1,207 tokens.

Download SKILL.mdSave it as .claude/skills/diffusion-engineering/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
diffusion-engineering
description
Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Использовать при любых задачах с диффузионными моделями: проектирование или модификация архитектуры (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.

Diffusion Engineering Skill

Быстрая ориентация

Три инженерных решения, которые больше всего влияют на качество/скорость/стоимость:

  1. Где идёт диффузия → пиксели (дорого) или латентное пространство (LDM/SD-семейство — практично)
  2. Backbone денойзера → UNet (классика, проще) или Transformer/DiT/Flow (масштабируется лучше)
  3. Управление сэмплингом → scheduler, число шагов, guidance_scale — часто дают больше, чем правка сети

Reference files — читать по задаче

ТемаФайлКогда читать
Архитектуры и data flowreferences/architectures.mdDDPM/SDE/LDM/DiT/Flux/VAE/SDXL, схема пайплайна
Schedulers и guidancereferences/samplers.mdDDIM/Euler/Heun/DPM-Solver/PNDM, CFG, prediction_type
Обучение и дообучениеreferences/training.mdLoss/цели, LoRA/DreamBooth/full FT, гиперпараметры
Память и распределённостьreferences/memory.mdAMP, checkpointing, ZeRO, FSDP, quantization, FP8
Текст-энкодеры и данныеreferences/encoders-data.mdCLIP/Qwen/multi-encoder, токенизация, data pipeline
Оценка и траблшутингreferences/eval-debug.mdFID/CLIPScore/LPIPS, типовые поломки и фиксы, лицензии

Быстрый чеклист «я строю/модифицирую diffusion»

  • Backbone: UNet (проще) или DiT/Flow (масштабирование)?
  • Модули зафиксированы: tokenizer → text encoder → encoder_hidden_states → denoiser → VAE decode
  • Scheduler выбран: DDIM / Euler / DPM-Solver — A/B на фиксированных seed
  • Дообучение: начинать с LoRA, в full fine-tune только при необходимости
  • Память: AMP включён, при необходимости checkpointing, при масштабе ZeRO/FSDP
  • Данные: стриминг/шардинг (HF streaming, WebDataset), валидировать throughput dataloader
  • Оценка: выбрать метрики под требуемый результат и доступные данные, а не обязательный набор FID/CLIPScore/LPIPS. Для парной ретуши проверять сохранность личности/геометрии/цвета и целевое изменение на фиксированном наборе; FID не заменяет эти проверки. См. references/eval-debug.md.

Trade-offs на один экран

РучкаУвеличитьУменьшить
num_inference_steps↑ время; качество проверять для данной модели↓ время; качество проверять, особенно у distilled моделей
guidance_scale (CFG)↑ adherence к промпту, риск «пережога»↑ разнообразие
LoRA rank↑ выразительность↑ параметры, риск overfitting
Шаги дообучения↑ адаптация↑ риск catastrophic forgetting
Batch size↑ стабильность градиентов↑ VRAM

Show full SKILL.md (140 more words)Show less

Мини-рецепты по бюджету GPU

БюджетЧто делать
8–16 GB (1 GPU)LoRA вместо full FT; grad accumulation; BF16/FP16; xFormers/SDPA; 8-bit оптимизатор
24–48 GB (1–4 GPU)LoRA или partial FT; иногда FSDP; большее разрешение
8+ GPU, H100Full FT, ZeRO-3/FSDP, float8, WebDataset стриминг, масштабный датапайплайн

Gotchas

  • Универсальный набор метрик превращал малую парную edit-задачу в ненужный сбор тысяч генераций. Метрика должна проверять конкретное требование; численный балл не заменяет визуальную приёмку.
  • Число workers и оптимизации памяти — кандидаты для замера на данном runtime, не обязательная лестница. Больше workers может замедлить Windows-пайплайн или дублировать iterable-данные.

Troubleshooting

СимптомПроверкаДействие
Оценка не отвечает, исправлена ли ретушьСвязать каждую метрику с требованием и эталонной паройЗаменить нерелевантную метрику проверкой нужного свойства; сохранить визуальный контроль
Загрузка данных медленнее после настройкиСравнить throughput, память и уникальность данных с num_workers=0Оставить измеренно подходящие параметры; шардировать iterable dataset при нескольких workers

© AnastasiyaW, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/ai-ml/diffusion-engineering of AnastasiyaW/codex-claude-code-config.

  • SKILL.md
  • references/architectures.md
  • references/encoders-data.md
  • references/eval-debug.md
  • references/memory.md
  • references/samplers.md
  • references/training.md

Open the folder on GitHubat commit cdcb11d

Compare with similar skills

Diffusion Engineering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diffusion Engineering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diffusion Engineering this skillAnastasiyaW/codex-claude-code-config154—~1.2kAutomated safety check: PassMIT
Model Registryartokun/comfyui-mcp793—~2.1kAutomated safety check: PassMIT
Castguaardvark/guaardvark251—~673Automated safety check: PassMIT
LoRA Space Builderhuggingface/skills11k2 repos~8.4kAutomated safety check: PassApache-2.0
Workflow Template BuilderMooshieblob1/MooshieUI207—~640Automated safety check: PassAGPL-3.0
Z Image Txt2imgartokun/comfyui-mcp793—~2.8kAutomated safety check: PassMIT

Similar skills

  • Model Registry

    artokun/comfyui-mcp

    Curated download URLs and target directories, organized by family (Flux, WAN, LTX, Qwen, Z-Image, SD15/SDXL), for every model the comfyui-mcp skills reference, covering checkpoints, VAEs, text…

    793 GitHub stars~2.1k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Cast

    guaardvark/guaardvark

    Build consistent characters, environments and props in Guaardvark's Cast Library and train LoRAs for them locally (reference photos → vision bible → sample plan → approved samples → training).

    251 GitHub stars~673 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • LoRA Space Builder

    huggingface/skills

    Official

    Builds and publishes a Gradio demo on Hugging Face Spaces for a LoRA, with the pipeline, UI and settings chosen to match that LoRA's task and model card.

    11k GitHub starsUsed in 2 repos~8.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Workflow Template Builder

    Mooshieblob1/MooshieUI

    Builds or modifies ComfyUI workflow JSON templates in MooshieUI's Rust backend (src-tauri/src/templates).

    207 GitHub stars~640 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Z Image Txt2img

    artokun/comfyui-mcp

    Build Z-Image txt2img workflows. An agent skill from artokun/comfyui-mcp.

    793 GitHub stars~2.8k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Anima Base

    artokun/comfyui-mcp

    Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT).

    793 GitHub stars~4k tokensUpdated 2 days ago
    Media & CreativeAuto-check passed

More from AnastasiyaW/codex-claude-code-config

All 52 skills in this repo
  • Bug Reproducer

    AnastasiyaW/codex-claude-code-config

    Find likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix.

    154 GitHub stars~4.1k tokensUpdated 5 days ago
    Auto-check passed
  • Motion Framer

    AnastasiyaW/codex-claude-code-config

    A skill your agent uses when implementing Motion or Framer Motion in React/JavaScript: interactive UI components, micro-interactions, gestures, layout or page transitions, and scroll-based animation.

    154 GitHub starsUsed in 1 repo~5.2k tokens
    Auto-check passed
  • Proof Verify

    AnastasiyaW/codex-claude-code-config

    Plan-based verification - freeze acceptance criteria before building, then verify after with an independent fresh-context agent (the builder must not verify their own work).

    154 GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check passed
  • Workflow Orchestration

    AnastasiyaW/codex-claude-code-config

    Написание и запуск Claude Code dynamic workflows (JS-оркестратор субагентов).

    154 GitHub stars~3.8k tokensUpdated 5 days ago
    Auto-check passed
  • Notebooklm Grounded Research

    AnastasiyaW/codex-claude-code-config

    A skill your agent uses when: NotebookLM, notebooklm MCP, large documentation sets, courses, books, papers, or citation-backed research are mentioned.

    154 GitHub stars~2.4k tokensUpdated 5 days ago
    Auto-check: warnings
  • Deepseek Provider Contract

    AnastasiyaW/codex-claude-code-config

    Validate a proposed DeepSeek API integration before any key or project context is sent: check thinking-mode tool-call history, strict-schema assumptions, bounded output, and provider data boundaries.

    154 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed

Questions about Diffusion Engineering

What does Diffusion Engineering do?

Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Diffusion Engineering is an agent skill from AnastasiyaW/codex-claude-code-config. Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти.

When should I use Diffusion Engineering?

Diffusion Engineering fits situations like: Это общая диффузионная инженерия; Не специфика FLUX.2 Klein.

How do I install Diffusion Engineering in Claude Code?

Run `npx skills add AnastasiyaW/codex-claude-code-config --skill diffusion-engineering -a claude-code`. Or copy the skill folder (skills/ai-ml/diffusion-engineering in AnastasiyaW/codex-claude-code-config) into .claude/skills/diffusion-engineering in your project. Claude Code loads it when a task matches its description.

How do I install Diffusion Engineering in Codex?

Run `npx skills add AnastasiyaW/codex-claude-code-config --skill diffusion-engineering -a codex`. Or copy the skill folder (skills/ai-ml/diffusion-engineering in AnastasiyaW/codex-claude-code-config) into .agents/skills/diffusion-engineering in your project. Codex loads it when a task matches its description.

Can I use Diffusion Engineering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AnastasiyaW/codex-claude-code-config --skill diffusion-engineering -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diffusion-engineering, .gemini/skills/diffusion-engineering, .github/skills/diffusion-engineering and .opencode/skills/diffusion-engineering in your project.

What does Diffusion Engineering need to run?

SKILL.md names no scripts, command-line tools or credentials: Diffusion Engineering is instructions for the agent only.

Does Diffusion Engineering access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Diffusion Engineering safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Diffusion Engineering use?

Diffusion Engineering is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diffusion Engineering use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to Diffusion Engineering?

Skills that share tags, products or a category with Diffusion Engineering: Model Registry (artokun/comfyui-mcp, 793 stars), Cast (guaardvark/guaardvark, 251 stars), LoRA Space Builder (huggingface/skills, 11k stars) and Workflow Template Builder (Mooshieblob1/MooshieUI, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diffusion Engineering?

AnastasiyaW (a GitHub user) maintains it in AnastasiyaW/codex-claude-code-config, which has 154 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 2, 2026.

Source: AnastasiyaW/codex-claude-code-config on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.