← 返回 Skills 市场
nissan

Image Gen Compare

作者 Nissan Dookeran · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
379
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install image-gen-compare
功能描述
Side-by-side comparison of paid vs local image generation models — DALL-E 3, FLUX.1-schnell, Gemini Imagen, and others. Generates images from the same prompt...
使用说明 (SKILL.md)

Image Gen Compare

Generate images from the same prompt across multiple models and compare results. Tracks costs, generation time, and quality for informed model selection.

Supported Models

Model Type Cost Speed (M4)
DALL-E 3 Cloud (OpenAI) ~$0.04-0.08/img 5-10s
FLUX.1-schnell Local (mflux) Free ~105s
Gemini Imagen 4.0 Cloud (Google) $0.04-0.13/img 3-8s
SDXL-Turbo Local (diffusers) Free ~15s (512px)

Usage

python3 scripts/image_gen_compare.py --prompt "cyberpunk alley at night"
python3 scripts/image_gen_compare.py --model dalle3  # Single model
python3 scripts/image_gen_compare.py --list           # Previous runs

Key Lesson

Gemini (Imagen 4.0) beats fine-tuned SD 1.5 with zero training. Use commercial APIs for production quality; local models for experimentation, privacy, and offline use.

Files

  • scripts/image_gen_compare.py — Comparison script with metadata logging
安全使用建议
This skill does what it says (compare image generators), but take these precautions before installing or running it: - Secrets: It needs your OPENAI_API_KEY. It also expects a 1Password service token (OP_SERVICE_ACCOUNT_TOKEN) / or a token file at ~/.config/openclaw/.op-service-token to run the 'op' CLI and fetch the OpenAI key. Providing a 1Password service token gives the script the ability to read stored secrets—only proceed if you trust the code and the exact 1Password item path (op://OpenClaw/OpenAI API Key/credential). - Binaries and deps: The script calls the 'op' CLI but the skill metadata does not list 'op' as a required binary. Ensure 'op' is installed and reviewed before use. You will also need to install Python packages (requests, mflux, diffusers, torch, etc.) and expect large model downloads from HuggingFace (>7GB). Run in an environment with sufficient disk space and network policy you control. - File writes: The script will save images and runs.json into workspace/content/images and—if a Proton Drive path exists—into a hardcoded Proton Drive directory. If you do not want artifacts copied to cloud‑synced folders, check or remove that hardcoded path in the script first. - Audit before running: Because the script invokes subprocesses and accesses local credential stores, review the code yourself (or run it in an isolated VM/container) to confirm it only accesses the locations you expect. Consider setting OPENAI_API_KEY directly instead of giving the script access to your 1Password service account, or remove the 1Password fetch logic if you prefer. If you are comfortable with those behaviors (network outbound, large downloads, local file writes, and optional 1Password access), the skill is coherent enough for use; if not, treat it as untrusted and do not provide sensitive tokens or run it on a production machine.
功能分析
Type: OpenClaw Skill Name: image-gen-compare Version: 1.0.1 The skill facilitates image generation comparison but includes high-risk behaviors such as executing subprocesses and accessing sensitive files in the user's home directory. Specifically, `scripts/image_gen_compare.py` reads a service token from `~/.config/openclaw/.op-service-token` and uses `subprocess.run` to invoke the 1Password CLI (`op`) for secret retrieval. While these actions are documented in the `SKILL.md` security notes and aligned with the stated purpose of API key management, the use of out-of-band secret retrieval and hardcoded local cloud storage paths (Proton Drive) meets the threshold for a suspicious classification.
能力评估
Purpose & Capability
The skill's name/description (compare paid vs local image models) matches the included script: it calls OpenAI for DALL‑E and local libraries for FLUX/SDXL. However it hardcodes a Proton Drive path for outputs and expects to fetch secrets from 1Password—these are plausible but not obviously necessary to the stated purpose and are unusual choices (especially a single Proton Drive path baked into the script).
Instruction Scope
SKILL.md and the script instruct the agent to use network outbound calls (OpenAI API, HuggingFace model downloads), read/write files (workspace content plus a hardcoded Proton Drive path), and invoke the 1Password CLI via subprocess to retrieve keys. The instructions reference reading a local token file (~/.config/openclaw/.op-service-token) and running 'op read op://OpenClaw/OpenAI API Key/credential' — these expand scope to local credential stores and system CLI tools outside the stated domain of image generation.
Install Mechanism
No install spec (instruction-only) — lower risk because nothing is installed automatically. But the script imports requests, mflux, diffusers, torch, etc., and will require the user to pip-install large ML packages and model downloads from HuggingFace. Those downloads are expected for local models but can be large (~7–9GB).
Credentials
Declared required env vars are OPENAI_API_KEY and OP_SERVICE_ACCOUNT_TOKEN. OPENAI_API_KEY is proportionate for DALL‑E. OP_SERVICE_ACCOUNT_TOKEN is plausible for using the 1Password CLI, but the script does not actually read OP_SERVICE_ACCOUNT_TOKEN from the environment by default: it first checks OPENAI_API_KEY then attempts to read a token file (~/.config/openclaw/.op-service-token) and sets that into the subprocess env. The script also invokes the 'op' CLI, but 'op' is not declared as a required binary. Requiring a 1Password service token grants access to stored secrets—this is sensitive and should be justified and handled explicitly by the user.
Persistence & Privilege
The skill is not always:true and does not request persistent platform privileges. It writes outputs and a runs.json into workspace and may write into a Proton Drive folder if present; it invokes 'op' but does not modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-gen-compare
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-gen-compare 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Add security_notes: base64 is standard image API response encoding, OP token is for 1Password key retrieval
v1.0.0
Initial release — paid vs local image model comparison
元数据
Slug image-gen-compare
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Image Gen Compare 是什么?

Side-by-side comparison of paid vs local image generation models — DALL-E 3, FLUX.1-schnell, Gemini Imagen, and others. Generates images from the same prompt... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 379 次。

如何安装 Image Gen Compare?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-gen-compare」即可一键安装,无需额外配置。

Image Gen Compare 是免费的吗?

是的,Image Gen Compare 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Image Gen Compare 支持哪些平台?

Image Gen Compare 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Image Gen Compare?

由 Nissan Dookeran(@nissan)开发并维护,当前版本 v1.0.1。

💬 留言讨论