360 Secure SkillHub
360 安全技能中心

Image Gen Compare

该 Skill 提供 Python 脚本,用同一提示词在 DALL-E 3、FLUX.1-schnell、Gemini Imagen 4.0 和 SDXL-Turbo 等模型上生成图像,记录成本、生成时间与元数据并保存运行历史,支持单模型运行和历史列表查看,用于评估项目应选用哪个图像模型。

nissan
nissan
热度 56.62
最近更新 2026-05-17 13:05:20
分类:创作依赖:代码执行 / 第三方 API / 读写文件应用场景:图像生成 / 研究 / 报告撰写 / 推荐

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add image-gen-compare
Metadata
name
image-gen-compare
version
1.0.1
description
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, logs metadata, and stores run history. Use when evaluating which image model to use for a project.
metadata
{"openclaw":{"emoji":"🖼️","requires":{"bins":["python3"],"env":["OPENAI_API_KEY","OP_SERVICE_ACCOUNT_TOKEN"]},"primaryEnv":"OPENAI_API_KEY","network":{"outbound":true,"reason":"Calls OpenAI DALL-E API for paid image generation. Local models (FLUX via mflux) run on-device."},"security_notes":"base64 used to encode image binary data returned by image generation APIs — standard API response format. OP_SERVICE_ACCOUNT_TOKEN is used to retrieve API keys from 1Password CLI."}}

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