Xpersona
S

stable Diffusion Skill

CLAWHUB · Unverified

Complete Stable Diffusion WebUI integration skill. Supports txt2img, img2img, inpainting, ControlNet, LoRA, model switching, upscaling, and more via SD WebUI... Skill: stable Diffusion Skill Owner: markcookie Summary: Complete Stable Diffusion WebUI integration skill. Supports txt2img, img2img, inpainting, ControlNet, LoRA, model switching, upscaling, and more via SD WebUI... Tags: ai-art:1.0.1, controlnet:1.0.1, image-generation:1.0.1, latest:1.0.1, lora:1.0.1, stable-diffusion:1.0.1 Version history: v1.0.1 | 2026-04-06T18:29:03.741Z | user - Moved tool scripts into a dedic

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s173a6b7vatqkph605zqy4jgdh84adc0:stable-diffusion-skill
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-markcookie-stable-diffusion-skill/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

23,387 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: stable-diffusion
description: "Complete Stable Diffusion WebUI integration skill. Supports txt2img, img2img, inpainting, ControlNet, LoRA, model switching, upscaling, and more via SD WebUI API. Use when user wants to generate images with Stable Diffusion, edit images, apply styles, use ControlNet, or manage SD models."
description_zh: "完整的 Stable Diffusion 图像生成 Skill,支持文生图、图生图、局部重绘、ControlNet、LoRA、模型切换、超分辨率放大等全套功能,通过 SD WebUI API 调用本地部署实例。"
description_en: "Full Stable Diffusion integration: txt2img, img2img, inpainting, ControlNet, LoRA, upscaling via local SD WebUI API."
version: "1.0.0"
homepage: https://github.com/AUTOMATIC1111/stable-diffusion-webui
allowed-tools: Bash, Read, Write, Edit
metadata:
  clawdbot:
    emoji: 🎨
    requires:
      bins:
        - python
      env:
        - SD_WEBUI_URL
      pip:
        - requests
        - Pillow
    setup:
      - "确保本地已启动 Stable Diffusion WebUI(带 --api 参数)"
      - "默认地址:http://127.0.0.1:7860"
      - "安装依赖:pip install requests Pillow"
---

# 🎨 Stable Diffusion Skill

通过本地部署的 **Stable Diffusion WebUI API** 实现完整的 AI 图像生成与编辑能力。

> **前提条件**:需要本地安装并启动 SD WebUI(AUTOMATIC1111 版本),启动时加上 `--api` 参数。
> 默认 URL:`http://127.0.0.1:7860`(可通过环境变量 `SD_WEBUI_URL` 修改)

---

## 🚀 快速开始

### 检查连接状态
```bash
python ${CLAUDE_SKILL_DIR}/sd_client.py --action status
```

### 第一次使用流程
1. 确认 SD WebUI 已运行(`--api` 模式)
2. 检查连接:`python ${CLAUDE_SKILL_DIR}/sd_client.py --action status`
3. 查看可用模型:`python ${CLAUDE_SKILL_DIR}/sd_client.py --action list-models`
4. 生成第一张图!

---

## 📋 功能速查表

| 功能 | 命令关键词 | 说明 |
|------|-----------|------|
| 文生图 | txt2img / 生成图片 / 画 | 从文字描述生成图像 |
| 图生图 | img2img / 图片风格化 | 基于参考图生成新图 |
| 局部重绘 | inpaint / 修图 / 重绘 | 修改图片特定区域 |
| ControlNet | controlnet / 姿势控制 | 精确控制图像结构 |
| 超分辨率 | upscale / 放大 / 高清 | 放大图片并增强细节 |
| 模型管理 | 换模型 / 加载模型 | 切换检查点/LoRA |
| 批量生成 | 批量 / batch | 一次生成多张变体 |
| 提示词工具 | 优化提示词 / 翻译 | 将中文描述转为 SD 提示词 |

---

## 🖼️ 文生图(txt2img)

### 基本用法
用户说:"帮我画一张..."、"生成一张..."、"txt2img..."

**参数收集流程**:
1. 如果用户没提供详细参数,先询问关键信息:
   - 描述(正向提示词)
   - 风格偏好(写实/动漫/油画等)
   - 尺寸(512x512 / 768x768 / 512x768 等)
2. 将中文描述智能转换为 SD 提示词(见提示词转换规则)
3. 调用 API 生成

**执行命令**:
```bash
python ${CLAUDE_SKILL_DIR}/sd_client.py --action txt2img \
  --prompt "1girl, beautiful, masterpiece, best quality" \
  --negative-prompt "ugly, bad anatomy, blurry" \
  --width 512 --height 768 \
  --steps 20 --cfg-scale 7 \
  --sampler "DPM++ 2M Karras" \
  --seed -1 \
  --output-dir "./sd_output"
```

**常用参数说明**:
| 参数 | 默认值 | 说明 |
|------|-------|------|
| `--steps` | 20 | 采样步数(推荐 20-30) |
| `--cfg-scale` | 7 | 提示词遵从度(1-30,推荐 5-12) |
| `--sampler` | DPM++ 2M Karras | 采样器 |
| `--seed` | -1 | 随机种子(-1=随机) |
| `--width/height` | 512x512 | 图像尺寸(需为 8 的倍数) |
| `--batch-size` | 1 | 每批生成数量 |
| `--n-iter` | 1 | 批次数量 |

---

## 🔄 图生图(img2img)

用户说:"把这张图片..."、"参考这张图风格化..."、"img2img..."

```bash
python ${CLAUDE_SKILL_DIR}/sd_client.py 

_meta.json

{
  "ownerId": "kn7aw78qdw5xrvjbrymv270s4s84bvev",
  "slug": "stable-diffusion-skill",
  "version": "1.0.1",
  "publishedAt": 1775500143741
}

skill-card.md

## Description:

Complete Stable Diffusion WebUI integration skill for image generation, image editing, inpainting, ControlNet, LoRA, model switching, and upscaling through the SD WebUI API.

This skill is ready for commercial/non-commercial use.

## Publisher:

[markcookie](https://clawhub.ai/user/markcookie)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and creators use this skill to guide an agent through Stable Diffusion WebUI image generation and editing workflows. It helps prepare prompts, run txt2img and img2img commands, use inpainting and ControlNet, manage models and LoRA references, and upscale generated images.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Prompts and selected input images can be sent to the configured Stable Diffusion WebUI endpoint.

Mitigation: Keep SD_WEBUI_URL on localhost or a trusted HTTPS endpoint, and avoid sending sensitive images to remote servers.

Risk: Generated galleries or output directories may include untrusted filenames.

Mitigation: Use trusted output directories and inspect filenames before opening generated galleries.

Risk: Generated images may be subject to user, model, copyright, and usage-policy obligations.

Mitigation: Review generated outputs and confirm the applicable Stable Diffusion WebUI and model terms before use.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/markcookie/skills/stable-diffusion-skill)
- [ClawHub publisher profile](https://clawhub.ai/user/markcookie)
- [Stable Diffusion WebUI project homepage](https://github.com/AUTOMATIC1111/stable-diffusion-webui)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, code, files, guidance]

**Output Format:** [Markdown guidance with inline shell commands and generated image file paths]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May produce image files in a local output directory through the configured Stable Diffusion WebUI endpoint.]

## Skill Version(s):

1.0.1 (source: server release metadata; artifact frontmatter says 1.0.0)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to stable Diffusion Skill and adjacent AI workflows.