← 返回
内容创作 中文

SGLang-Diffusion Image Generation

Generate images using a local SGLang-Diffusion server (FLUX, Stable Diffusion, Qwen-Image, etc.). Use when: user asks to generate, create, draw, or render an...
使用本地 SGLang-Diffusion 服务器生成图像(支持 FLUX、Stable Diffusion、Qwen-Image 等)。适用场景:用户请求生成、创建、绘制或渲染……
jiangyukunok
内容创作 clawhub v1.0.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 781
下载
💾 33
安装
2
版本
#latest

概述

SGLang-Diffusion Image Generation

Generate images via a local SGLang-Diffusion server's OpenAI-compatible API.

Prerequisites

  • SGLang-Diffusion server running (default: http://127.0.0.1:30000)
  • If the server was started with --api-key, set SGLANG_DIFFUSION_API_KEY env var

Generate an image

python3 {baseDir}/scripts/generate.py --prompt "a futuristic cityscape at sunset"

Useful flags

python3 {baseDir}/scripts/generate.py --prompt "portrait of a cat" --size 512x512
python3 {baseDir}/scripts/generate.py --prompt "abstract art" --negative-prompt "blurry, low quality"
python3 {baseDir}/scripts/generate.py --prompt "landscape" --steps 30 --guidance-scale 7.5 --seed 42
python3 {baseDir}/scripts/generate.py --prompt "photo" --server http://192.168.1.100:30000 --out ./my-image.png

API key (optional)

Only needed if the SGLang-Diffusion server was started with --api-key.

Set SGLANG_DIFFUSION_API_KEY, or pass --api-key directly:

python3 {baseDir}/scripts/generate.py --prompt "hello" --api-key sk-my-key

Or configure in ~/.openclaw/openclaw.json:

{
 skills: {
   "sglang-diffusion": {
     env: { SGLANG_DIFFUSION_API_KEY: "sk-my-key" },
   },
 },
}

Notes

  • The script prints a MEDIA: line for OpenClaw to auto-attach on supported chat providers.
  • Output defaults to timestamped PNG in /tmp/.
  • Do not read the image back; report the saved path only.

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-03-29 14:47 安全 安全
  • v1.0.0
    2026-03-11 17:38

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,973
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,513
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,221