Agent skill · AI & Agents

diffusion-model-patterns

Diffusion model training and inference patterns including UNet/DiT architectures, noise schedules, CFG, ControlNet, and LoRA. Use when building or fine-tuning image generation models.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill diffusion-model-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/ai-ml/diffusion-model-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Diffusion Model Patterns ## Architecture Selection | Architecture | Params | Scaling | Best For | |-------------|--------|---------|----------| | **UNet** | Conv-based, skip connections | Moderate (plateaus >2B) | Standard image gen, ControlNet compat | | **DiT** | Transformer blocks, AdaLN | Scales well (>10B) | Large-scale training, video, high-res | | **UViT** | Transformer + long skip connections | Good | Bridge between UNet and DiT | | Formulation | Training | Sampling | When to Use | |-------------|----------|----------|-------------| | **DDPM** | Discrete timesteps, epsilon prediction | Slow (1000 steps) | Learning/prototyping | | **DDIM** | Same training as DDPM | Fast (10-50 steps deterministic) | Drop-in replacement for faster DDPM sampling | | **Flow Matching** | Continuous time, velocity prediction | Fast, ODE-based | State-of-the-art; SD3, Flux | | **Rectified Flow** | Straight paths, reflow | Very fast (1-4 steps possible) | Distilled models, real-time inference | Default recommendation: Flow matching with DiT for new projects. UNet + DDPM/DDIM for compatibility with existing Stable Diffusion ecosystem. ## Training Loop (DDPM, Epsilon Prediction) ```python import to

What's inside
Steps it walks through
  1. Architecture Selection
  2. Training Loop (DDPM, Epsilon Prediction)
  3. Sampling with Different Schedulers
  4. Scheduler Decision
  5. Classifier-Free Guidance (CFG)
  6. CFG Scale Guidelines
  7. ControlNet Conditioning
  8. LoRA for Diffusion Models
  9. Gotchas and Anti-Patterns
  10. Noise Schedule Selection
  11. EMA Decay
  12. VAE Encoding
  13. Inference Optimization
  14. Common Mistakes
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the diffusion-model-patterns skill do?

Diffusion model training and inference patterns including UNet/DiT architectures, noise schedules, CFG, ControlNet, and LoRA. Use when building or fine-tuning image generation models.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill diffusion-model-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going