ai-photo-pro

v2.0.0

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

0· 42·0 current·0 all-time
by爱卿扣杀@lianghaoxun

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for lianghaoxun/ai-photo-pro.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "ai-photo-pro" (lianghaoxun/ai-photo-pro) from ClawHub.
Skill page: https://clawhub.ai/lianghaoxun/ai-photo-pro
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install ai-photo-pro

ClawHub CLI

Package manager switcher

npx clawhub@latest install ai-photo-pro
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the scripts call NVIDIA and SiliconFlow endpoints, accept prompts, and save images. The only credential needs (API keys stored in a local config.json) align with the described external services.
Instruction Scope
SKILL.md tells the agent to run the provided Python scripts and to create a local config.json with API keys — this is within scope. Minor issues: it hardcodes a path (/home/ubuntu/.openclaw/skills/...) which may not match all environments, and the tool writes images/response.json into the skill directory; these are expected for this functionality but worth noting.
Install Mechanism
No install spec (instruction-only), and bundled code is present. Nothing is downloaded from external or untrusted URLs and no install-time archive extraction occurs.
Credentials
The skill requests no environment variables but requires API keys placed in a local config.json — this is proportionate to its function. Note: keys are stored in plaintext in the skill folder; consider file permissions or storing keys in a safer secret store.
Persistence & Privilege
always is false and the skill does not request special system privileges. It writes image and response files inside its own directory only, which is expected behavior.
Assessment
This skill appears coherent with its description, but before installing: 1) Verify you are comfortable giving NVIDIA/SiliconFlow API keys to this local skill and that you obtain those keys from the official provider sites; 2) Be aware API keys are stored in plaintext config.json inside the skill folder — restrict file permissions or use a secure secret store if possible; 3) The SKILL.md uses a hardcoded path (/home/ubuntu/.openclaw/skills/...), so adjust paths if your agent runs under a different user or location; 4) Inspect the scripts yourself (they are short and readable) and test in a sandbox if you have concerns; 5) If you need stricter isolation, run the scripts in a container/VM or modify them to read keys from environment variables or a secure vault.

Like a lobster shell, security has layers — review code before you run it.

latestvk975n2v1bwp7vxvvyvtp44t04585m4xv
42downloads
0stars
2versions
Updated 19h ago
v2.0.0
MIT-0

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 捕获并发送

Comments

Loading comments...