Stable Diffusion Image Generation logo

Stable Diffusion Image Generation

Organization
taracodlabs
stable-diffusion-image-generation

Generate images via Stable Diffusion (HuggingFace Diffusers, local/API)

Overview

Publishertaracodlabs
Repositoryaiden
Skill namestable-diffusion-image-generation
Stars
852
Forks
150
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by taracodlabs on GitHub. Read the source before you install it.

Installation

Install the Stable Diffusion Image Generation AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/taracodlabs/aiden/tree/main/skills/stable-diffusion-image-generation
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/taracodlabs/aiden.git /tmp/aiden
mkdir -p .claude/skills
cp -r /tmp/aiden/skills/stable-diffusion-image-generation .claude/skills/stable-diffusion-image-generation
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Stable Diffusion Image Generation in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Stable Diffusion Image Generation on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Stable Diffusion Image Generation is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Stable Diffusion Image Generation

Generate images from text prompts using Stable Diffusion locally via HuggingFace Diffusers, or via the HuggingFace Inference API for zero-install operation.

When to Use

  • User wants to generate an image from a text description
  • User wants to create concept art, illustrations, or visual mockups
  • User wants to experiment with AI image generation locally
  • User wants to generate multiple variations of an image
  • User wants to use img2img (image-to-image) transformation

How to Use

1. Quick generation via HuggingFace Inference API (no GPU needed)

python
import requests, base64, os

def generate_image_api(prompt, output="output.png"):
  api_url = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
  headers = {"Authorization": f"Bearer {os.environ['HF_TOKEN']}"}
  resp    = requests.post(api_url, headers=headers, json={"inputs": prompt}, timeout=120)
  resp.raise_for_status()
  with open(output, "wb") as f:
    f.write(resp.content)
  print(f"Saved: {output}")

# Set HF_TOKEN in env: huggingface.co/settings/tokens
generate_image_api("a futuristic city at night, cyberpunk style, neon lights, 8k")

2. Local generation with Diffusers (requires GPU or CPU + patience)

python
# pip install diffusers transformers accelerate torch
from diffusers import StableDiffusionXLPipeline
import torch

pipe = StableDiffusionXLPipeline.from_pretrained(
  "stabilityai/stable-diffusion-xl-base-1.0",
  torch_dtype=torch.float16,
  use_safetensors=True
)
pipe = pipe.to("cuda")   # use "cpu" if no GPU (very slow)

image = pipe(
  prompt="a majestic mountain landscape at golden hour, photorealistic",
  negative_prompt="blurry, low quality, cartoon",
  num_inference_steps=30,
  guidance_scale=7.5,
  width=1024, height=1024
).images[0]

image.save("landscape.png")
print("Saved: landscape.png")

3. Generate multiple variations

python
images = pipe(
  prompt="a robot reading a book in a cozy library",
  num_images_per_prompt=4,
  num_inference_steps=25,
).images

for i, img in enumerate(images):
  img.save(f"variation_{i+1}.png")
  print(f"Saved variation_{i+1}.png")

4. Write effective prompts

Good prompt structure:

[subject], [style], [setting/background], [lighting], [quality tags]

Examples:
"a golden retriever puppy, oil painting style, in a sunlit meadow, warm afternoon light, highly detailed"
"abstract data visualization, dark background, glowing cyan lines, geometric patterns, 4k"
"portrait of a scientist, dramatic studio lighting, photorealistic, sharp focus, professional headshot"

Useful negative prompt additions:

"blurry, low quality, watermark, signature, deformed, extra limbs, bad anatomy, poorly drawn"

5. CPU-only generation (slower but works without GPU)

python
from diffusers import StableDiffusionPipeline
import torch

pipe = StableDiffusionPipeline.from_pretrained(
  "runwayml/stable-diffusion-v1-5",
  torch_dtype=torch.float32
)

image = pipe(
  prompt="a simple landscape, watercolor style",
  num_inference_steps=15,    # fewer steps = faster on CPU
  width=512, height=512      # smaller size for CPU
).images[0]
image.save("output.png")

Examples

"Generate an image of a futuristic AI lab" → Use step 1 (API) if HF_TOKEN is set. Prompt: "futuristic AI research lab, holographic displays, clean aesthetic, cinematic lighting".

"Create 4 variations of a logo concept for a tech startup" → Use step 3 with a logo-style prompt and num_images_per_prompt=4.

"Generate an image locally without internet" → Use step 2 (local Diffusers). SDXL needs ~8GB VRAM; for CPU use step 5 with SD v1.5 at 512×512.

Cautions

  • SDXL requires at least 8GB VRAM for float16; use SD v1.5 (step 5) on CPU or low-VRAM GPUs
  • First run downloads model weights (~6-7GB) — this takes time; subsequent runs use cache
  • HuggingFace Inference API free tier has rate limits — set a delay between requests for batch generation
  • Generated images may reflect biases in training data — review outputs before publishing
  • HF_TOKEN must be set as an environment variable — never hardcode it in scripts

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Stable Diffusion Image Generation AI skill do?

Generate images via Stable Diffusion (HuggingFace Diffusers, local/API)

Why use Stable Diffusion Image Generation on TypingMind?

Because you install it once and use it with any model. Stable Diffusion Image Generation is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Stable Diffusion Image Generation in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/taracodlabs/aiden/tree/main/skills/stable-diffusion-image-generation. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Stable Diffusion Image Generation?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Stable Diffusion Image Generation?

As many as you like. As long as a model supports skills, you can use Stable Diffusion Image Generation with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Stable Diffusion Image Generation AI skill free?

Yes. It is published on GitHub by taracodlabs under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇