Stable Diffusion for Openclaw

A comprehensive Stable Diffusion WebUI integration for generating and editing high-quality AI images through a local API.

markcookie
v1.0.1
Apr 7, 2026
0
1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install stable-diffusion-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install stable-diffusion-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Stable Diffusion?

The Stable Diffusion skill enables AI agents to interface directly with local Stable Diffusion WebUI instances (AUTOMATIC1111). It provides a robust set of tools for high-fidelity image generation, including support for text-to-image, image-to-image, and advanced upscaling. By utilizing this integration within Openclaw Skills, developers can create powerful visual automation workflows while maintaining full control over their models and data privacy locally.

This skill is designed for maximum flexibility, allowing agents to handle complex creative tasks. From simple prompt-based generation to intricate multi-layered edits, it effectively bridges the gap between natural language instructions and professional-grade image synthesis.

Stable Diffusion Use Cases

  • Creating custom character art and landscapes from text descriptions using txt2img.
  • Stylizing existing photographs into anime, cyberpunk, or traditional art styles via img2img.
  • Precision image editing using inpainting to swap objects or fix specific visual areas.
  • Generating high-resolution assets and textures for game development or marketing.
  • Batch processing multiple image variants to explore creative directions quickly.

How Stable Diffusion Works

  1. The system identifies an image-related intent and extracts parameters like prompts, dimensions, and styles from the user's request.
  2. The integrated prompt helper translates non-English descriptions into optimized keywords for the Stable Diffusion model.
  3. The skill communicates with the local Stable Diffusion API, which must be running with the --api flag.
  4. Parameters such as sampling steps, CFG scale, and model checkpoints are sent to the backend for processing.
  5. The local instance synthesizes the image using the specified checkpoint or LoRA.
  6. The resulting image is saved to the designated output directory and returned to the user through the Openclaw Skills framework.

Stable Diffusion Setup

To use this skill, you must have a local instance of Stable Diffusion WebUI (AUTOMATIC1111) running with the --api argument enabled.

# Install required Python dependencies
pip install requests Pillow

# Set your local SD WebUI URL (default is http://127.0.0.1:7860)
export SD_WEBUI_URL="http://127.0.0.1:7860"

# Check the connection status to ensure the API is reachable
python sd_client.py --action status

Stable Diffusion Data Schema & Taxonomy

The skill manages its operations using environment variables and structured directory outputs.

Key Component Description
SD_WEBUI_URL The endpoint for the local Stable Diffusion API service.
SD_OUTPUT_DIR The local directory where all generated images are stored.
sd_client.py The main execution script handling all API calls and actions.
prompt_helper.py Tooling for keyword optimization and language translation.

Stable Diffusion Advanced Features

  • Full ControlNet support including modules like OpenPose and Canny for precise structural guidance.
  • Dynamic model management for switching between different checkpoints and VAEs during runtime.
  • Hires Fix capabilities to generate high-definition images without typical tiling artifacts.
  • Built-in LoRA support using the lora:name:weight syntax within prompts.
  • Support for advanced samplers like DPM++ 2M Karras and UniPC for superior result quality within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*