- Home
- Skills
- Image & Video
- diffusion forge
Works with the AI Agents you already use
diffusion forge
by sohaila emad
A from-scratch PyTorch implementation of Stable Diffusion 1.5 for local or Colab-based image generation.
Free
diffusion forge
Example session with this skill installed
I want to generate an image of a white cat with wide eyes, cinematic lighting. I don't have a GPU. Can you set it up and run it for me?
- Read your context and instructions
- Compiled the diffusion forge
- Generated the image
You don't need a local GPU. DiffusionForge runs on a free Google Colab T4, and I'll guide you through it.
Setup (about 5 minutes, one time)
- Open Colab and upload
colab/DiffusionForge_Colab.ipynbfrom this skill. - Go to Runtime → Change runtime type → T4 GPU, then Connect.
- Run the cells in order. Upload
diffusion-forge.zipwhen the first cell asks.
What you'll see
doctor checks your environment:
PyTorch: 2.14.1+cu130
CUDA available: True
GPU: Tesla T4
OK: data/vocab.json
OK: data/merges.txt
setup downloads the official Stable Diffusion 1.5 checkpoint (4.27 GB, first run only, about 40 seconds on Colab).
Generate
python sd/cli.py txt2img \
--prompt "A white cat with wide eyes, cinematic lighting" \
--steps 50 --cfg-scale 8 --seed 42 \
--output outputs/cat.png
Using GPU: Tesla T4
100% 50/50 [00:27<00:00, 1.81it/s]
Image saved to: outputs/cat.png
| Setting | Value |
|---|---|
| Model | Stable Diffusion 1.5 (from-scratch PyTorch) |
| Sampler | DDPM, 50 steps |
| CFG scale | 8 |
| Seed | 42 (same seed, same image) |
| Time on T4 | about 27 seconds |
Next steps
- Change
--seedfor variations, or--cfg-scale(6 to 9) for how closely it follows the prompt. - Transform one of your own images with
img2img --strength 0.8. Lower values keep more of the original.
diffusion-forge.zip
PNG · 1536×1024
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Modern image generation often relies on bloated, opaque libraries that hide the underlying mechanics. This skill provides a transparent, from-scratch PyTorch implementation of Stable Diffusion 1.5, allowing you to generate images while seeing exactly how the CLIP encoder, VAE, and U-Net interact.
What it does
- Text-to-Image Generation converts natural language prompts into 512x512 PNG images using a DDPM sampler.
- Image-to-Image Transformation modifies existing images based on a prompt and a configurable strength parameter.
- Environment Diagnostics runs a doctor command to verify CUDA availability and tokenizer integrity before execution.
- Automated Model Setup handles the download and verification of the official 4.3 GB SD 1.5 checkpoint from Hugging Face.
- Latent Control exposes raw parameters for classifier-free guidance, diffusion steps, and seed-based reproducibility.
How it works
- Environment Check Run
doctorto confirm your NVIDIA GPU and CUDA drivers are ready. - Initial Setup Execute the
setupcommand to pull the required 4.3 GB checkpoint into local cache. - Image Synthesis Use the
txt2imgorimg2imgCLI commands with your desired prompt and parameters. - Colab Integration Upload the provided notebook and skill zip to a Google Colab T4 instance if local VRAM is insufficient.
Frameworks & tools
Built with Python 3.10 and PyTorch. It utilizes the official Stable Diffusion 1.5 weights and requires an NVIDIA CUDA-enabled GPU with at least 16 GB VRAM for local execution.
Why this beats prompting it yourself
Most tools wrap diffusion in high-level abstractions that are hard to debug or modify. This skill gives you a readable, decoupled codebase of the entire pipeline, making it an ideal reference for developers building custom generative workflows or studying latent diffusion.
Use cases
- Generate 512x512 assets for prototyping without external API costs.
- Restyle existing images using the img2img strength control.
- Debug and study the internal attention and U-Net layers of SD 1.5.
- Run private image generation on local hardware or free Colab instances.
Known limitations
Requires an NVIDIA GPU, as CPU-only generation is not practical. Local execution is untested on cards with less than 16 GB VRAM. Only produces 512x512 output.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 15 days ago
- Free with an Agensi account
- Accounts
Hugging Face
- Software
Pythonpytorch
Permissions
What's inside
Frequently Asked Questions
New in Image & Video
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Video Skills.