ai-photo-pro

通过 NVIDIA NIM API 或 SiliconFlow API 生成图片。支持 Kolors (快手可图)、Qwen-Image (通义千问)、flux.2-klein-4b 等模型。当用户要求"生成图片"、"画一张图"、"AI绘图"或类似表达时调用。支持中文提示词,返回图片文件路径。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ai-photo-pro" with this command: npx skills add lianghaoxun/ai-photo-pro

AiPhotoPro - AI 图片生成工具

支持双引擎:NVIDIA NIM API(flux.2-klein-4b)和 SiliconFlow API(Kolors / Qwen-Image)。

调用方式

命令行(推荐)

# SiliconFlow - 可图 Kolors(默认)
python /home/ubuntu/.openclaw/skills/ai-photo-pro/scripts/siliconflow_main.py "<提示词>" ["<负面提示词>"]

# SiliconFlow - 通义千问 Qwen-Image(付费模型,建议按需选取)
python /home/ubuntu/.openclaw/skills/ai-photo-pro/scripts/siliconflow_main.py "<提示词>" ["<负面提示词>"] --model Qwen/Qwen-Image

# NVIDIA NIM API - flux.2-klein-4b
python /home/ubuntu/.openclaw/skills/ai-photo-pro/scripts/nvid_main.py "<提示词>"

Python 导入

import sys
sys.path.insert(0, '/home/ubuntu/.openclaw/skills/ai-photo-pro/scripts')

# SiliconFlow
from siliconflow_main import generate_png
img_list = generate_png(model="Kwai-Kolors/Kolors", base_str="<提示词>", negative_prompt="<负面提示词>")

# NVIDIA
from nvid_main import run_pngvidapi
img_path = run_pngvidapi(model="flux.2-klein-4b", base_str="<提示词>")

参数说明

SiliconFlow generate_png()

参数类型必填说明
modelstring模型名,默认 Kwai-Kolors/Kolors,可选 Qwen/Qwen-Image(付费模型,建议按需选取)
base_strstring中文提示词
negative_promptstring负面提示词,可空
batch_sizeint批量大小,默认 1
num_inference_stepsint推理步骤数,默认 20
guidance_scalefloat提示词匹配度,默认 2.5

NVIDIA run_pngvidapi()

参数类型必填说明
modelstring固定填 flux.2-klein-4b
base_strstring中文提示词

输出

  • 图片保存路径:/home/ubuntu/.openclaw/skills/ai-photo-pro/scripts/img_data/<model>_<timestamp>.png
  • 函数返回值为图片路径列表

API Key 配置

首次使用需配置 API Key,运行交互式配置脚本:

python /home/ubuntu/.openclaw/skills/ai-photo-pro/scripts/config_json.py

或手动写入 config.json(位于 scripts/ 目录):

{
  "NVID": "nvapi-你的NVID密钥",
  "SILICONFLOW": "sk-你的SiliconFlow密钥"
}

获取 Key

示例提示词

人物:

一位美丽的短发东亚女性坐在高层公寓的落地窗前,身穿紧身的白色衬衫,(光线是午后柔和的定向自然光,在人物身上形成优美的明暗轮廓),脸上带着温暖而亲密的微笑,皮肤毛孔清晰,虹膜清晰锐利

物体/场景:

一个小苹果,红彤彤的,挂在绿叶树枝上,阳光照射,背景是模糊的果园,摄影风格,高清细节

风格化:

赛博朋克城市夜景,霓虹灯光,雨后街道,反射,高对比度,电影感

注意事项

  • SiliconFlow 默认尺寸 1024×1024,steps=20
  • NVIDIA 默认尺寸 1024×1024,steps=4(更快)
  • 生成失败 SiliconFlow 会抛出异常;NVIDIA 会自动重试最多 5 次
  • 图片路径通过函数返回值传递,方便 agent 捕获并发送

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated