当前位置: 首页 > Skill >

ZM IMG2 视觉提示词编排

ZM IMG2 视觉提示词编排

ZM IMG2 视觉提示词编排

ZM IMG2 视觉提示词编排,把漫画页、PPT 主视觉、封面/配图等结构化视觉需求编译为可执行的 happy/gpt-image-2 提示词,并检查参考图、主角图、风格、禁止项及 IMG2生产证据。

0.1.0 2026.11.23 749
获取Skill文件查看使用说明
作 者:江景 许可证: 更新时间:2026.11.23
本文目录收起

Visual Prompt Compiler IMG2

This skill is a thin compiler and evidence wrapper for comic image generation. It does not call Responses/Codex image tools. Actual image creation is delegated to:

python3 skills/zm-img2-generation-direct/scripts/run.py

With reference images present, that direct skill routes to /images/edits on the configured Happy OpenAI-compatible image provider (https://sub2api.happyhourse.cn/v1, model gpt-image-2).

Purpose

Use this when a comic page has a long editorial brief but the image API needs a short, hard, clear prompt.

The compiler accepts structured JSON/YAML or CLI fields:

  • page_id
  • title
  • scene
  • dialogues / dialogue
  • screen_text
  • reminder
  • characters
  • forbidden
  • style_ref_text
  • reference_images

It produces a concise prompt, normally about 200-500 Chinese/English characters for simple comic pages, and avoids embedding long review standards.

Reference image policy

Default behavior is minimal:

  • use only explicit character reference images from reference_images;
  • do not add a style page image by default;
  • optional --style-image <path> can add one style reference, for example P1;
  • reject any input image whose path/name matches a forbidden term, such as P2;
  • require non-empty input_images by default (--require-character-refs, default true);
  • cap input images with --max-input-images, default 2.

Artifacts

Each compiler run creates a directory under:

<openclaw-home>/generated-images/zm-visual-prompt-img2-workflow/_compiler_runs/<task>-<timestamp>/

Artifacts:

  • compiled_prompt.txt
  • request.json
  • result.json
  • run_command.md
  • stdout.txt
  • stderr.txt
  • summary.json

For actual runs, summary.json also points to the underlying zm-img2-generation-direct run directory and output image.

Dry-run

Compile and validate only:

python3 skills/zm-visual-prompt-img2-workflow/scripts/compile_and_run.py 
  skills/zm-visual-prompt-img2-workflow/examples/ai_hallucination_p03.json 
  --task-name ai-hallucination-p03-compiler-test 
  --dry-run

Check:

cat <openclaw-home>/generated-images/zm-visual-prompt-img2-workflow/_compiler_runs/<run>/compiled_prompt.txt
cat <openclaw-home>/generated-images/zm-visual-prompt-img2-workflow/_compiler_runs/<run>/summary.json

Actual img2img run

Single attempt, 600000ms timeout:

python3 skills/zm-visual-prompt-img2-workflow/scripts/compile_and_run.py 
  skills/zm-visual-prompt-img2-workflow/examples/ai_hallucination_p03.json 
  --task-name ai-hallucination-p03-compiler-test 
  --run 
  --timeout-ms 600000 
  --max-attempts 1

Expected proof for acceptance:

  • summary.json.ok: true
  • summary.json.used_direct_endpoint_actual: /images/edits
  • summary.json.actual_mode: edit
  • summary.json.input_images contains only the cat and husky references;
  • no P2, no logo/QR/lobster/OpenClaw input image;
  • underlying result.json has provider: happy, model: gpt-image-2, mode: edit, input_images populated.

Lightweight checks

python3 -m py_compile skills/zm-visual-prompt-img2-workflow/scripts/compile_and_run.py
python3 skills/zm-visual-prompt-img2-workflow/scripts/compile_and_run.py --help
python3 skills/zm-visual-prompt-img2-workflow/scripts/compile_and_run.py 
  skills/zm-visual-prompt-img2-workflow/examples/ai_hallucination_p03.json --dry-run

Notes

  • This skill has no delivery/upload behavior.
  • It does not mutate zm-img2-generation-direct.
  • It intentionally favors short prompts and minimal references to reduce slow or interrupted upstream requests.

相关文章

更多
ai-image-generation统一调用50+图像模型

ai-image-generation Skill 通过 inference.sh CLI 统一了 50 多个图像模型的调用入口,涵盖 GPT-Image-2.6、FLUX 等主流模型。该方案将模型选择与参数配置集中管理,简化了文生图、图生图等任务的发起流程,便于团队在批量生成或横向评测时切换模型,但需注意各模型能力差异及输入格式限制。

2026.11.12 181
Skill 文件

相关 Skill

更多
图生PPT 图生PPT 用 OpenAI gpt-image-2 一键生成高审美、高完成度的 PPT
暗格人物封面图 暗格人物封面图 使用gpt-image-2模型生成小红书封面,固定风格为深色背景+人物侧影+亮黄大字,3:4竖版比例,电影感光影。当用户需要生成暗色调人物封面、深色背景小红书封面、人物IP风格封面时使用此技能。
xiaohongshu |小红书 AI 宣传图和图文笔记技能 xiaohongshu |小红书 AI 宣传图和图文笔记技能 小红书 AI 宣传图和图文笔记技能 - 根据用户提示词自动判断生成单张或多张宣传图,调用 gpt-image-2 或火山引擎 Ark 文生图模型生成视觉素材并合成小红书图片;仅在用户明确要求发布时才执行发布。
GPT Image 2 API GPT Image 2 API 通过OpenAI gpt-image-2模型生成和编辑图片。通用CLI,支持任意AI代理(Hermes、Claude Code、Codex、OpenClaw等)。
AI绘图大师 AI绘图大师 基于六维视觉分析框架的高级AI绘图提示词工程技能。它专为即梦、GPT-Image-2、Nano Banana 等新一代文生图模型量身定制,能够将模糊的创意或复杂的画面,转化为表现力极强的自然语言提示词。 SOCAWT 六维框架解析:不只是看表面,通过系统化的视觉分析框架深度解构画面,确保提示词逻辑严密、细节拉满。 🗣️ 自然语言叙事流:彻底抛弃传统的“标签式/词汇堆砌”写法,采用符合人类语感与模型深度理解的自然语言长句,激发新一代模型的最佳生成效果。 🔄 双模式智能切换: 模式一:灵感创作 — 没有参考图?只需文字描述你的想象,即可生成高质量提示词。 模式二:逆向提取 — 提供参考图,自动识别图像类型,自适应分析深度,精准提取并还原画面提示词。