Works with the AI Agents you already use

    diffusion forge

    by sohaila emad

    1

    A from-scratch PyTorch implementation of Stable Diffusion 1.5 for local or Colab-based image generation.

    Free

    Security scanned
    diffusion forge

    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)

    1. Open Colab and upload colab/DiffusionForge_Colab.ipynb from this skill.
    2. Go to Runtime → Change runtime type → T4 GPU, then Connect.
    3. Run the cells in order. Upload diffusion-forge.zip when 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
    
    SettingValue
    ModelStable Diffusion 1.5 (from-scratch PyTorch)
    SamplerDDPM, 50 steps
    CFG scale8
    Seed42 (same seed, same image)
    Time on T4about 27 seconds

    Next steps

    • Change --seed for 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

    Generated

    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

    1. Environment Check Run doctor to confirm your NVIDIA GPU and CUDA drivers are ready.
    2. Initial Setup Execute the setup command to pull the required 4.3 GB checkpoint into local cache.
    3. Image Synthesis Use the txt2img or img2img CLI commands with your desired prompt and parameters.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Browser
    Network Access
    Read Files
    Listed15 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard libraries that hide the process, this skill provides a transparent, decoupled PyTorch implementation. It’s designed for developers who want to see and modify the interaction between the CLIP encoder, VAE, and U-Net rather than just calling a black-box API.

    You will need an NVIDIA GPU with at least 16GB of VRAM for local execution, or a Google Colab T4 instance. The skill requires Python 3.10, PyTorch, and approximately 5GB of disk space for the official SD 1.5 weights.

    Yes, the 'img2img' command allows you to modify existing images by adjusting the strength parameter. This lets you control how much the final output deviates from your original source image while following your text prompt.

    The purchase includes the full PyTorch source code for the diffusion pipeline, a CLI tool for generation, a 'doctor' diagnostic script, and a ready-to-use Google Colab notebook for cloud-based execution.

    The skill features an automated setup command that handles the download and verification of the official 4.3 GB Stable Diffusion 1.5 checkpoint from Hugging Face, ensuring all necessary model weights are correctly placed.

    Currently, the implementation is optimized for the standard Stable Diffusion 1.5 resolution of 512x512 pixels to ensure consistency and stability within the raw PyTorch pipeline.

    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.

    Free