一键导入
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 页面并帮你完成安装。
基于 SOC 职业分类
软件著作权登记全流程:从代码仓/目录生成程序鉴别材料(源程序文档)、 软件操作手册、申请填报信息 Markdown,并可辅助在线填报。 当用户需要申请软件著作权、生成软著材料时触发。
维护 business-developer 的 SQLite 追踪数据库,记录已探索的创作者(模式一)和已互动的帖子(模式二),避免重复追踪和重复互动。
通过自媒体平台搜索内容,在评论区以留言/回复/私信等方式拓展潜在客户或进行品牌宣传。用于 HEARTBEAT 定时任务。
维护 business-developer 的 SQLite 情报采集数据库,记录已采集的信息内容,避免重复采集,支持按日查询已采集情报。
定时监控特定信源(自媒体账号/网页),按预设标准提取商业情报,生成简报或报告。用于 cron 定时任务。
通过自媒体平台按搜集策略探索潜在客户——策略 A 分析帖子发布者画像,策略 B 从评论区挖掘潜客。用于 HEARTBEAT 定时任务。
| 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 参数触发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) |
--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 gallerySiliconFlow 图片生成经常出现异常:返回一张纯色背景图(单色无内容),而非 prompt 要求的图像。
每张图生成后必须执行验证,不得跳过。
image 工具查看刚生成的图片