一键导入
siliconflow-img-gen
Generate or edit images via SiliconFlow Images API. Text-to-image uses Qwen/Qwen-Image; image-edit uses Qwen/Qwen-Image-Edit-2509.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate or edit images via SiliconFlow Images API. Text-to-image uses Qwen/Qwen-Image; image-edit uses Qwen/Qwen-Image-Edit-2509.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Publish videos to Bilibili (B站) via Open Platform API (OAuth2). Supports chunked video upload, cover image, tags, and partition selection. Requires BILIBILI_APP_ID and BILIBILI_APP_SECRET environment variables.
内容校准预测循环——打分 → 盲预测 → T+3d复盘 → 进化 rubric。按平台独立迭代,每个平台拥有自己的 rubric、校准池、预测日志、受众画像。本技能负责打分(blind sub-agent + score-only.sh + 阈值门 + 流程 1A)与校准闭环;发布记录与数据采集由 published-track 统一管理。
口播视频去口误。自动识别并删除静音、语气词、卡顿词、重复句、残句等,输出干净视频+字幕+剪映草稿。触发词:去口误、剪口播、de-mouth、去除口误
Generate custom WeChat CSS themes from natural language descriptions, WeChat article URLs, or recent articles from a WeChat Official Account. Produces a valid CSS file conforming to wenyan and ready for wx-mp-publisher.
一站式短视频制作。支持文章链接、追爆报告、文字主题等多种输入,用 gen.py 直连火山 Seedance / 阿里云百炼 Wan2.7-HappyHorse 端点生成视频素材(声画同出),FFmpeg 组装成片。
通过浏览器自动化发布视频到微信视频号。处理 wujie shadow DOM,支持视频上传、标题描述填写、即时发布。
| name | siliconflow-img-gen |
| description | Generate or edit images via SiliconFlow Images API. Text-to-image uses Qwen/Qwen-Image; image-edit uses Qwen/Qwen-Image-Edit-2509. |
| metadata | {"openclaw":{"emoji":"🖼️","requires":{"bins":["python3"],"env":["SILICONFLOW_API_KEY"]},"primaryEnv":"SILICONFLOW_API_KEY","homepage":"https://docs.siliconflow.cn/cn/api-reference/images/images-generations"}} |
Generate or edit images using the SiliconFlow Images API.
Two modes:
Qwen/Qwen-Image; on HTTP 403/404/429/500/503/504, automatically retries with baidu/ERNIE-Image-TurboQwen/Qwen-Image-Edit-2509,由 --image 参数触发📍 全局技能路径提示:文中所有
./scripts/路径均相对于本技能所在目录(即<skill>标签location属性所指目录),不是工作区目录。执行时按本技能实际安装路径拼接。
Note: Image generation can take 10–60 seconds. Set a higher timeout when invoking via exec (e.g., exec timeout=120).
Do NOT set env vars inline (e.g., SILICONFLOW_API_KEY=... python3 ...). The env var is already in the system environment; inline assignments break the exec permission check.
# Text-to-image (default model: Qwen/Qwen-Image)
python3 ./scripts/gen.py --prompt "your prompt here"
# Manually specify ERNIE-Image-Turbo (also used as auto-fallback on 403/404/429/500/503/504)
python3 ./scripts/gen.py --prompt "your prompt here" --model "baidu/ERNIE-Image-Turbo"
# Image-edit (default model: Qwen/Qwen-Image-Edit-2509)
python3 ./scripts/gen.py --prompt "add a lighthouse" --image "https://example.com/source.jpg"
# Square output (default)
python3 ./scripts/gen.py --prompt "a futuristic city at dusk"
# Landscape 16:9
python3 ./scripts/gen.py --prompt "mountain lake" --image-size 1664x928
# Portrait 9:16
python3 ./scripts/gen.py --prompt "mountain lake" --image-size 928x1664
# Enable CFG (useful when prompt contains text to render)
python3 ./scripts/gen.py --prompt "a sign saying HELLO" --cfg 4.0 --steps 50
# Save to specific directory
python3 ./scripts/gen.py --prompt "sunset" --out-dir ./out/images
# Edit with a single source image
python3 ./scripts/gen.py \
--prompt "make it night time" \
--image "https://example.com/photo.jpg"
# Edit with up to three source images
python3 ./scripts/gen.py \
--prompt "blend these photos" \
--image "https://example.com/a.jpg" \
--image2 "https://example.com/b.jpg" \
--image3 "https://example.com/c.jpg"
| Flag | Default | Description |
|---|---|---|
--prompt | required | Text description for the image |
--model | auto | Model ID; auto-selected by mode if omitted |
--image-size | 1328x1328 | Resolution (text-to-image only, must be one of the valid values below — invalid values will cause an error with the closest valid suggestion) |
--steps | 20 | Inference steps (1–100) |
--cfg | — | CFG scale (0.1–20). Qwen recommends 4.0 when generating text in image; must be >1 for text generation |
--seed | — | Random seed (0–9999999999) |
--negative-prompt | — | Concepts to exclude, not necessary |
--image | — | Source image URL — enables image-edit mode |
--image2 | — | Second source image URL (edit mode only) |
--image3 | — | Third source image URL (edit mode only) |
--out-dir | ./tmp/sf-img-<ts> | Output directory |
--image-size values (Qwen/Qwen-Image)Invalid sizes are rejected — the script exits with an error listing all valid options and suggesting the closest match by aspect ratio. Re-run with a valid
--image-size.
| Value | Ratio |
|---|---|
1328x1328 | 1:1 (default) |
1664x928 | 16:9 |
928x1664 | 9:16 |
1472x1140 | 4:3 |
1140x1472 | 3:4 |
1584x1056 | 3:2 |
1056x1584 | 2:3 |
*.png images named by indexprompts.json mapping index → prompt + URLindex.html thumbnail gallery适用于图文混合素材(短视频封面、社媒海报、信息图配图等)——需要模型一次性渲染文字与画面,而不是后期合成。
| 参数 | 推荐值 | 原因 |
|---|---|---|
--cfg | 4.0 | Qwen 官方建议:只要 prompt 里有要渲染的文字,CFG 必须 ≥4,否则文字会糊、错位、出现乱码字符 |
--steps | 50 | 默认 20 文字边缘发虚;提高到 50 文字锐利可读 |
--image-size | 按平台选 | 9:16 竖屏 928x1664、16:9 横屏 1664x928、1:1 方图 1328x1328(必须在合法值列表内) |
--negative-prompt | 可选 | 大部分时候并不需要 |
❌ 反例(泛泛描述):
"Generate an attractive short-video cover with a title about AI"
✅ 正例(按视觉布局分段写,明确写出要渲染的文字):
"A dramatic vertical 9:16 short-video cover. Background: bold red-to-black gradient. Top: glowing AI chip icons with text 'DeepSeek'. Middle: large bold Chinese text '前几周 DeepSeek 还是神一般的存在' in white and gold gradient with sharp shadows. Bottom: dramatic red glowing Chinese text '为什么热度消散得这么快?' with lightning effects. Style: high contrast, modern tech poster, dramatic lighting, professional Chinese typography, sharp text rendering, cinematic, no watermarks."
要点:
--negative-prompt并不是必须的,大部分时候现代模型并不需要特别指定负面提示。
image 工具分析图片,逐项确认:
--negative-prompt 防止)from PIL import Image
img = Image.open("00.png").convert("RGB")
img.save("cover.jpg", "JPEG", quality=92)
不做任何像素修改,只是格式转换。python3 ./scripts/gen.py \
--prompt "A dramatic vertical 9:16 short-video cover with bold red and black gradient background, glowing AI chip icons floating in the upper area, and large bold Chinese text '前几周 DeepSeek 还是神一般的存在' in the middle in white and gold gradient with sharp shadows. At the bottom, dramatic glowing red Chinese text '为什么热度消散得这么快?' with lightning-like effects. Visual style: high contrast, modern tech poster, dramatic lighting, professional Chinese typography, sharp text rendering, cinematic, no watermarks" \
--image-size 928x1664 \
--cfg 4.0 \
--steps 50 \
--out-dir /path/to/output
SiliconFlow 图片生成经常出现异常:返回一张纯色背景图(单色无内容),而非 prompt 要求的图像。
每张图生成后必须执行验证,不得跳过。
image 工具查看刚生成的图片