微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

SGLang-Diffusion Image Generation

SGLang-Diffusion Image Generation · v1.0.1
安全 unknown 级 作者 jiangyukunok 公开目录收录
953 下载 0 安装 2.5k 收藏 2 浏览

简介

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

通过你的 Agent 添加

安装目录:sglang-diffusion/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/sglang-diffusion-image-generation/
Codex CLI~/.codex/skills/sglang-diffusion-image-generation/
DeepSeek Harness~/.agents/skills/sglang-diffusion-image-generation/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: sglang-diffusion description: "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 image with a locally running SGLang-Diffusion instance. NOT for: cloud-hosted image APIs (use openai-image-gen or nano-banana-pro instead). Requires a running SGLang-Diffusion server." homepage: https://github.com/sgl-project/sglang metadata: { "openclaw": { "emoji": "🎨", "requires": { "bins": ["python3"] }, }, }

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.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill