diffusion-models
Build and deploy diffusion model pipelines for image generation, inpainting, and fine-tuning using Hugging Face Diffusers.
Skill by UltronCore
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ultroncore-diffusion-models
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/diffusion-models
What's inside
- Skill name
diffusion-models- Description
- Build and deploy diffusion model pipelines for image generation, inpainting, and fine-tuning using Hugging Face Diffusers. Covers Stable Diffusion, SDXL, ControlNet, LORA fine-tuning, img2img, inpainting, and production serving with batching.
- License
- MIT
- Instructions
- 569 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 569 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Diffusion Models
## Overview
Diffusion models learn to reverse a gradual noising process to generate high-quality images from noise, conditioned on text prompts, images, or other signals. The Hugging Face Diffusers library provides a consistent API across Stable Diffusion, SDXL, Kandinsky, DeepFloyd, and ControlNet pipelines. Fine-tuning via LoRA (Low-Rank Adaptation) lets you adapt any base model to custom styles or subjects with minimal compute and no catastrophic forgetting.
## When to Use
- Generating product images, marketing assets, or concept art from text descriptions
- Inpainting to remove objects or replace backgrounds in existing images
- Style transfer and image-to-image transformations
- Fine-tuning a base model on proprietary brand imagery or character consistency
- ControlNet for pose/depth/edge-conditioned generation
- Building a production image generation API with GPU batching
- Creating synthetic training data for downstream computer vision models
## Step-by-Step Workflow
### 1. Basic Text-to-Image Pipeline
```python
# pip install diffusers transformers accelerate torch
from diffusers import StableDiffusionXLPipeline
import torch
def load_sdxl_pipeline(model_id: str = "stabilityai/stable-diffusion-xl-base-1.0") -> StableDiffusionXLPipeline:
"""Load SDXL with memory optimizations for consumer GPUs."""
pipe = StableDiffusionXLPipeline.from_pretrained(
model_id,
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16",
)
pipe = pipe.to("cuda")
# Memory optimizations
pipe.enable_model_cpu_offload() # Moves models to CPU when not in use
pipe.enable_vae_slicing() # Processes VAE in slices to reduce VRAM
pipe.enable_attention_slicing() # Slices attention computation
return pipe
def generate_image(
pipe: StableDiffusionXLPipeline,
prompt: str,
negative_prompt: str = "blurry, low quality, distorted",
width: int = 1024,
height: int = 1024,
num_inference_steps: int = 30,
guidance_scale: float = 7.5,
seed: int | None = None,
):
generator = torch.Generator("cuda").manual_seed(seed) if seed is not None else None
images = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=width,
height=height,
num_inference_steps=num_inference_steps,
guidance_scale=guidance_scale,
generator=generator,
).images
return images[0]
# Usage
pipe = load_sdxl_pipeline()
image = generate_image(
pipe,
prompt="A majestic wolf howling at the moon, dramatic lighting, photorealistic, 8k",
seed=42,
)
image.save("output.png")
```
### 2. Image-to-Image and Inpainting
```python
from diffusers import StableDiffusionXLImg2ImgPipeline, StableDiffusionXLInpaintPipeline
from PIL import Image
import torch
# Image-to-image: transform an existing image
def img2img(
source_image: Image.Image,
prompt: str,
strength: float = 0.7, # 0=no change, 1=completely new image
guidance_scale: float = 7.5,
num_steps: int = 30,
) -> Image.Image:
pipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-refiner-1.0",
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16",
).to("cuda")
result = pipe(
prompt=prompt,
image=source_image.resize((1024, 1024)),
strength=strength,
guidance_scale=guidance_scale,
num_inference_steps=num_steps,
).images[0]
return result
# Inpainting: replace masked regions
def inpaint(
source_image: Image.Image,
mask_image: Image.Image, # White=region to fill, Black=keep
prompt: str,
negative_prompt: str = "blurry, artifacts",
num_steps: int = 50,
) -> Image.Image:
pipe = StableDiffusionXLInpaintPipeline.from_pretrained(
"diffusers/stable-diffusion-xl-1.0-inpainting-0.1",
torch_dtype=torch.float16,
use_safetensors=True,
).to("cuda")From UltronCore/claude-skill-vault, MIT.
More from UltronCore/claude-skill-vault
- 0.494score
ai-agent-memory
UltronCore
Design and implement memory systems for AI agents — short-term working context, episodic memory in vector stores, entity extraction into knowledge graphs…
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
ai-cost-optimizer
UltronCore
LLM cost reduction: prompt caching, model routing, token optimization, and batching.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
claude-tool-use
UltronCore
Advanced Claude tool/function calling patterns: tool definitions, parallel tool use, tool result chaining, and agentic loops.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
embeddings-expert
UltronCore
Text embeddings for semantic search, clustering, RAG retrieval, and similarity.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
haystack
UltronCore
Production-ready LLM pipeline framework with component-based architecture for RAG and QA
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
guidance
UltronCore
Microsoft's structured generation library for constrained LLM outputs using Handlebars-style templates
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
autogen
UltronCore
Microsoft's multi-agent conversation framework for building collaborative AI workflows
SkillCFreshness: C★ 1Claude Code +9 - 0.485score
embedding-pipeline
UltronCore
Build production embedding pipelines for semantic search, RAG, and recommendation systems.
SkillCFreshness: C★ 1Claude Code +9 - 0.484score
computer-vision
UltronCore
Computer vision tasks: image classification, object detection, OCR, and manga/comic image processing.
SkillCFreshness: C★ 1Claude Code +9 - 0.483score
skill-name
UltronCore
One-line description of what this skill does and when to use it.
SkillCFreshness: C★ 1Claude Code +9 - 0.264score
ab-testing-statistics-ai-ml-stub
UltronCore
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 24, 2026 (5 months ago)
- Last release
- May 24, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/UltronCore/claude-skill-vault
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from UltronCore
- 0.494score
ai-agent-memory
UltronCore
Design and implement memory systems for AI agents — short-term working context, episodic memory in vector stores, entity extraction into knowledge graphs…
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
ai-cost-optimizer
UltronCore
LLM cost reduction: prompt caching, model routing, token optimization, and batching.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
claude-tool-use
UltronCore
Advanced Claude tool/function calling patterns: tool definitions, parallel tool use, tool result chaining, and agentic loops.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
embeddings-expert
UltronCore
Text embeddings for semantic search, clustering, RAG retrieval, and similarity.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
guidance
UltronCore
Microsoft's structured generation library for constrained LLM outputs using Handlebars-style templates
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
haystack
UltronCore
Production-ready LLM pipeline framework with component-based architecture for RAG and QA
SkillCFreshness: C★ 1Claude Code +9
Cite this page
diffusion-models skill. Agent Mart. https://agentmart.dev/skills/ultroncore-diffusion-models (last updated 2026-10-24)