makaron-cli 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +5 -4
- package/README.md +45 -1
- package/bin/makaron.mjs +22 -8
- package/craft/manifest.json +2877 -0
- package/craft/prompts/agent-coding.md +220 -0
- package/craft/prompts/agent.md +86 -0
- package/craft/prompts/animate.md +448 -0
- package/craft/prompts/audio.md +261 -0
- package/craft/prompts/captions.md +220 -0
- package/craft/prompts/coding-submission.md +31 -0
- package/craft/prompts/coding-workflow.md +26 -0
- package/craft/prompts/creative.md +108 -0
- package/craft/prompts/cutout.md +81 -0
- package/craft/prompts/enhance.md +123 -0
- package/craft/prompts/generate_image_tool.md +26 -0
- package/craft/prompts/image.md +222 -0
- package/craft/prompts/legacy/agent.md +123 -0
- package/craft/prompts/legacy/coding-tool.md +31 -0
- package/craft/prompts/legacy/video-tool.md +38 -0
- package/craft/prompts/legacy/workspace-authoring.md +13 -0
- package/craft/prompts/niji.md +117 -0
- package/craft/prompts/pony_translate.md +42 -0
- package/craft/prompts/remotion-composition.md +405 -0
- package/craft/prompts/video-reverse.md +170 -0
- package/craft/prompts/video-submission.md +44 -0
- package/craft/prompts/video-workflow.md +42 -0
- package/craft/prompts/wai_translate.md +28 -0
- package/craft/prompts/web-search.md +1 -0
- package/craft/prompts/wild.md +119 -0
- package/craft/prompts/workspace-authoring.md +13 -0
- package/craft/skills/SKILL_README.md +249 -0
- package/craft/skills/_shared/aesthetic-lens-contract.md +68 -0
- package/craft/skills/_shared/native-audiovisual.md +44 -0
- package/craft/skills/_shared/remotion-director-contract.md +133 -0
- package/craft/skills/_shared/remotion-video-director/README.md +140 -0
- package/craft/skills/_shared/remotion-video-director/SKILL.md +391 -0
- package/craft/skills/_shared/remotion-video-director/references/component-library.md +608 -0
- package/craft/skills/_shared/remotion-video-director/references/expert-definitions.md +214 -0
- package/craft/skills/_shared/remotion-video-director/references/music-and-audio.md +186 -0
- package/craft/skills/_shared/remotion-video-director/references/remotion-patterns.md +439 -0
- package/craft/skills/_shared/remotion-video-director/references/video-archetypes.md +395 -0
- package/craft/skills/_shared/speech-clock.md +63 -0
- package/craft/skills/_shared/spoken-caption.md +75 -0
- package/craft/skills/_shared/studio-production/audio-direction.md +60 -0
- package/craft/skills/_shared/studio-production/production-contract.md +188 -0
- package/craft/skills/_shared/studio-production/reference-analysis.md +37 -0
- package/craft/skills/_shared/studio-production/review-contract.md +77 -0
- package/craft/skills/_shared/studio-production/taste-direction.md +114 -0
- package/craft/skills/_shared/visual-asset-bridge/SKILL.md +57 -0
- package/craft/skills/_shared/visual-direction/SKILL.md +98 -0
- package/craft/skills/_shared/voice-translation.md +55 -0
- package/craft/skills/aesthetic-disney-character-motion/SKILL.md +66 -0
- package/craft/skills/aesthetic-lottiefiles-motion/SKILL.md +78 -0
- package/craft/skills/aesthetic-rampstack-direction/SKILL.md +68 -0
- package/craft/skills/ai-video-gen/SKILL.md +48 -0
- package/craft/skills/animated-explainer/SKILL.md +53 -0
- package/craft/skills/animation/SKILL.md +53 -0
- package/craft/skills/avatar-spokesperson/SKILL.md +66 -0
- package/craft/skills/canvas-procedural-animation/SKILL.md +48 -0
- package/craft/skills/character-animation/SKILL.md +57 -0
- package/craft/skills/character-animation-qa/SKILL.md +48 -0
- package/craft/skills/character-rigging/SKILL.md +48 -0
- package/craft/skills/cinematic/SKILL.md +53 -0
- package/craft/skills/cinematic-video/SKILL.md +65 -0
- package/craft/skills/clip-factory/SKILL.md +53 -0
- package/craft/skills/comfyui/SKILL.md +48 -0
- package/craft/skills/content-repurpose/SKILL.md +54 -0
- package/craft/skills/create-video/SKILL.md +48 -0
- package/craft/skills/documentary-montage/SKILL.md +53 -0
- package/craft/skills/doubao-tts/SKILL.md +51 -0
- package/craft/skills/explainer-aesthetic-disney/SKILL.md +33 -0
- package/craft/skills/explainer-aesthetic-lottiefiles/SKILL.md +33 -0
- package/craft/skills/explainer-aesthetic-rampstack/SKILL.md +33 -0
- package/craft/skills/explainer-video/SKILL.md +423 -0
- package/craft/skills/ffmpeg/SKILL.md +48 -0
- package/craft/skills/grok-media/SKILL.md +47 -0
- package/craft/skills/hybrid/SKILL.md +53 -0
- package/craft/skills/localization-dub/SKILL.md +59 -0
- package/craft/skills/long-video-anchor/SKILL.md +111 -0
- package/craft/skills/long-video-director/SKILL.md +217 -0
- package/craft/skills/long-video-storyboard/SKILL.md +102 -0
- package/craft/skills/makaron-mascot/SKILL.md +83 -0
- package/craft/skills/makaron-mascot/assets/character-sheet.jpg +0 -0
- package/craft/skills/makaron-mascot/assets/makaron-spark-pixel-wizard-concepts.png +0 -0
- package/craft/skills/media-use/SKILL.md +47 -0
- package/craft/skills/motion-design-video/SKILL.md +64 -0
- package/craft/skills/motion-graphics/SKILL.md +48 -0
- package/craft/skills/multi-angle-video/SKILL.md +533 -0
- package/craft/skills/music/SKILL.md +47 -0
- package/craft/skills/music-to-video/SKILL.md +60 -0
- package/craft/skills/photo-to-video/SKILL.md +60 -0
- package/craft/skills/podcast-repurpose/SKILL.md +53 -0
- package/craft/skills/pose-library-design/SKILL.md +48 -0
- package/craft/skills/reference-video-studio/SKILL.md +55 -0
- package/craft/skills/remotion/SKILL.md +48 -0
- package/craft/skills/remotion-best-practices/SKILL.md +48 -0
- package/craft/skills/screen-demo/SKILL.md +61 -0
- package/craft/skills/seedance-2-0/SKILL.md +48 -0
- package/craft/skills/seedance-2-5/SKILL.md +48 -0
- package/craft/skills/sound-effects/SKILL.md +47 -0
- package/craft/skills/source-video-studio/SKILL.md +68 -0
- package/craft/skills/speech-to-text/SKILL.md +47 -0
- package/craft/skills/sticker-maker/SKILL.md +178 -0
- package/craft/skills/svg-character-animation/SKILL.md +48 -0
- package/craft/skills/synthetic-screen-recording/SKILL.md +48 -0
- package/craft/skills/talking-head/SKILL.md +106 -0
- package/craft/skills/text-to-speech/SKILL.md +50 -0
- package/craft/skills/threejs-animation/SKILL.md +48 -0
- package/craft/skills/threejs-fundamentals/SKILL.md +48 -0
- package/craft/skills/threejs-geometry/SKILL.md +48 -0
- package/craft/skills/threejs-lighting/SKILL.md +48 -0
- package/craft/skills/threejs-materials/SKILL.md +48 -0
- package/craft/skills/threejs-shaders/SKILL.md +48 -0
- package/craft/skills/threejs-textures/SKILL.md +48 -0
- package/craft/skills/tiktok-video/SKILL.md +188 -0
- package/craft/skills/tiktok-video/references/audio-sync.md +58 -0
- package/craft/skills/tiktok-video/references/caption-direction.md +36 -0
- package/craft/skills/tiktok-video/references/delivery-qa.md +84 -0
- package/craft/skills/tiktok-video/references/platform-layout.md +62 -0
- package/craft/skills/video-edit/SKILL.md +144 -0
- package/craft/skills/video-edit/references/direct-reference-route.md +141 -0
- package/craft/skills/video-edit/references/editing-protocol.md +79 -0
- package/craft/skills/video-edit/references/frame-location.md +85 -0
- package/craft/skills/video-edit/references/replication-protocol.md +67 -0
- package/craft/skills/video-edit/references/shot-blueprint.md +116 -0
- package/craft/skills/video-edit/references/shot-blueprint.schema.json +143 -0
- package/craft/skills/video-edit/references/similarity-qa.md +47 -0
- package/craft/skills/video-edit/scripts/extract-shot-blueprint.mjs +313 -0
- package/craft/skills/video-ffmpeg-lab/SKILL.md +220 -0
- package/craft/skills/video-mature-themes/SKILL.md +175 -0
- package/craft/skills/video-segment-edit/SKILL.md +16 -0
- package/craft/skills/video-translate/SKILL.md +148 -0
- package/craft/skills/video-understand/SKILL.md +48 -0
- package/craft/skills/visual-style/SKILL.md +47 -0
- package/craft/skills/wan-3-0/SKILL.md +59 -0
- package/craft/skills/web-design-guidelines/SKILL.md +47 -0
- package/craft/skills/website-to-video/SKILL.md +61 -0
- package/craft-source.json +7 -0
- package/package.json +12 -5
- package/runtime/adapter.mjs +615 -0
- package/runtime/configure.mjs +28 -0
- package/runtime/tool-catalog.json +807 -0
- package/runtime/tool-cli.mjs +98 -0
- package/skills/makaron-native/SKILL.md +89 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
## creative(趣味创意)— 2个
|
|
2
|
+
|
|
3
|
+
让人看了忍不住笑、或忍不住转发的有趣改造。核心是**有趣**,不是"好看"。
|
|
4
|
+
|
|
5
|
+
### 三问自检(每个creative tip必须全部通过)
|
|
6
|
+
|
|
7
|
+
**Q1:为什么是这个元素?** — 能不能一句话说清楚"因为画面里有X,所以加Y才好笑"?而且这个Y**只能在这种场景出现**。说不清原因="不明所以"=4分,立即换一个。
|
|
8
|
+
- ✅ "因为是Disney乐园,所以三眼仔探头" — 场景直接关联
|
|
9
|
+
- ✅ "因为桂林漓江,加个鸬鹚渔翁" — 只有桂林才合理(8分)
|
|
10
|
+
- ✅ "因为孕妇照,宝宝从肚子里探头" — 只有孕妇场景才成立
|
|
11
|
+
- ❌ "因为在吃火锅,加个熊猫厨师" — 任何餐厅都能加熊猫厨师(6分,"跟鱼眼镜没什么关系")
|
|
12
|
+
- ❌ "因为...加个动物挺可爱的" — 通用理由 = 不通过
|
|
13
|
+
- ❌ "在男生头旁边加个漂浮热可可" — 为什么是热可可?跟画面什么关系?(4分,"不明所以")
|
|
14
|
+
|
|
15
|
+
**Q2:情绪对不对?** — 加入的元素带来的情绪是让人笑/惊喜,还是害怕/困惑?
|
|
16
|
+
- ✅ 让人会心一笑、想转发给朋友
|
|
17
|
+
- ❌ 让人害怕(鳄鱼在脸旁边=4分 "比较吓人"、蛇缠绕=4分 "令人不适"、蜘蛛爬上来=4分、昆虫爬脸)、让人困惑(跟画面无关的东西)
|
|
18
|
+
- ❌ 画面有蛇形雕刻/纹饰 → 加一条真蛇 — 虽然"有关联",但情绪是恐惧,不是惊喜(Q2不通过,选其他方向)
|
|
19
|
+
- ⚠️ 动物放在人脸附近时要特别注意:可爱动物=ok,爬行动物/有攻击性动物=吓人
|
|
20
|
+
|
|
21
|
+
**Q3:这个创意能用在其他照片上吗?** — 如果能,说明它太通用了,不够好。
|
|
22
|
+
- ✅ "孕妇照+宝宝探头" — 只有孕妇照才能用,专属创意
|
|
23
|
+
- ✅ "纽约街头+波普风格" — 只有纽约场景才匹配
|
|
24
|
+
- ❌ "加一根魔法棒" — 任何照片都能加 = 太通用
|
|
25
|
+
- ❌ "加星尘/光点/发光特效" — 任何照片都能加 = 太通用
|
|
26
|
+
- ❌ "转成吉卜力风" — 任何照片都能转 = 太通用(除非画面本身极度适合)
|
|
27
|
+
|
|
28
|
+
### 核心方向
|
|
29
|
+
|
|
30
|
+
#### 1. 幽默角色/道具植入(最高分方向)
|
|
31
|
+
在画面中加入与画面内容有**因果关系**的搞笑元素:
|
|
32
|
+
- 场景关联:基于场景的地点/文化/主题加入匹配元素(Disney+三眼仔=8分,桂林+鸬鹚渔翁=8分)
|
|
33
|
+
- 人物状态:基于人物正在做的事/穿的衣服/表情产生关联(孕妇+宝宝探头=8分,皮衣酷女+变色龙=8分)
|
|
34
|
+
- 物品关联:基于画面中的物品加入有因果关系的角色(如画面中有鱼竿→海鸥来抢鱼)
|
|
35
|
+
- 关键:新元素与画面的关系必须**不用解释就懂**
|
|
36
|
+
|
|
37
|
+
#### 2. 动态戏剧化瞬间
|
|
38
|
+
把画面中正在发生的动作推向极端:
|
|
39
|
+
- 切菜 → 食物飞溅的慢动作瞬间
|
|
40
|
+
- 跳跃 → 悬停半空的超能力感
|
|
41
|
+
- 举杯 → 酒液飞溅出奇幻形状
|
|
42
|
+
- 关键:基于人物**当前的具体动作**放大效果
|
|
43
|
+
|
|
44
|
+
#### 3. 风格化重绘(风格必须匹配画面文化/情感)
|
|
45
|
+
将照片转为全新艺术风格——但风格选择要回答Q1"为什么是这个风格?":
|
|
46
|
+
- 纽约街头 → 波普艺术(8分,"纽约配波普很漂亮")
|
|
47
|
+
- 东方山水 → 中国工笔画
|
|
48
|
+
- 时尚街拍 → 90年代杂志
|
|
49
|
+
- 温馨花园 → 莫奈油画
|
|
50
|
+
- 关键:风格与场景的文化/氛围要匹配,不能硬套
|
|
51
|
+
|
|
52
|
+
### 执行标准
|
|
53
|
+
|
|
54
|
+
#### 加法而非替换
|
|
55
|
+
- 原图80%以上画面保持不变,创意集中在一个局部焦点
|
|
56
|
+
- 往画面里**加入**元素,不要**替换**大面积区域
|
|
57
|
+
|
|
58
|
+
#### 品质要求 + 融入感自检(V11最重要教训)
|
|
59
|
+
**想象把编辑后的图发朋友圈,朋友会觉得"真拍到的"还是"P上去的"?**
|
|
60
|
+
- "真拍到的" = 成功(法斗趴肩上7分、鸬鹚渔翁8分 — 像真的在场景里)
|
|
61
|
+
- "P上去的" = 失败(卡通肌肉人5分"贴纸感"、竹筏熊猫5分"硬加进去的")
|
|
62
|
+
|
|
63
|
+
**导致贴纸感的三大原因**:
|
|
64
|
+
1. 卡通/拟人化角色 — 跟实拍场景永远不搭(cartoon muscle figure=5分、panda chef=6分)
|
|
65
|
+
2. 光影不匹配 — 角色没有被场景光正确照到
|
|
66
|
+
3. 无物理接触 — 只是"浮在"画面中
|
|
67
|
+
|
|
68
|
+
**规则**:所有加入的动物/角色必须是 **photorealistic**(写实)。禁止 cartoon-style、anthropomorphic、comic-style 角色(thought bubble 等漫画UI元素除外)。
|
|
69
|
+
- editPrompt 必须包含:"Match exact lighting direction, color temperature, and cast shadows from the original scene"
|
|
70
|
+
|
|
71
|
+
#### 大小和可见性
|
|
72
|
+
- 创意元素必须**足够大、足够显眼**(至少占画面5-10%)
|
|
73
|
+
- 放在视觉焦点附近,不是角落
|
|
74
|
+
|
|
75
|
+
#### 空间感知(画面拥挤度)
|
|
76
|
+
- 添加元素前先评估画面空间:画面已经很满了吗?
|
|
77
|
+
- ✅ 画面有空间(前景/背景有留白)→ 可以加较大元素
|
|
78
|
+
- ❌ 画面已经很拥挤(多人合照挤满画面)→ 不要硬塞大元素(3分,"在原本就比较拥挤的画面加入一个火烈鸟,不是很有意思")
|
|
79
|
+
- 拥挤画面的处理:选择小巧但精致的元素(趴在肩头的小动物、头顶上方的物品),或改用风格化方向
|
|
80
|
+
|
|
81
|
+
#### 互动感(极重要!不能有"贴纸感")
|
|
82
|
+
- 加入的元素必须与人物/场景**有互动**,不能像P上去的贴纸
|
|
83
|
+
- ✅ 人物看向新元素、新元素看向人物、有眼神交流(熊猫看镜头=8分、海鸥停肩头=8分)
|
|
84
|
+
- ❌ 元素只是放在画面中,跟人物毫无关系(松鼠在桌上但人没看它=5分,"贴纸感")
|
|
85
|
+
- editPrompt必须描述互动方式:"looking at"、"reaching towards"、"reacting to"
|
|
86
|
+
|
|
87
|
+
#### 避免无聊方向
|
|
88
|
+
Q2自检"情绪对不对?"和Q3"太通用?"已覆盖大部分无聊方向。如果一个创意的"有趣程度"需要解释才能理解,说明它不够好。
|
|
89
|
+
|
|
90
|
+
#### 慎用令人不适的元素
|
|
91
|
+
蛇、蜘蛛、蝎子等爬行/节肢动物容易让人不适(违反Q2情绪检验),尽量避免。画面有蛇形雕刻/浮雕时,优先选择其他更有趣的创意方向,不要默认"活化"。
|
|
92
|
+
|
|
93
|
+
#### 场景净化(editPrompt第一句话必须是)
|
|
94
|
+
- **`"FIRST: Clean up the scene — remove any element that draws attention away from the main subject but adds no compositional value (cluttered objects, background people, distracting items). Replace with natural-looking scene."`**
|
|
95
|
+
- 不只是enhance需要去路人!creative编辑时背景杂乱也会分散注意力,影响创意焦点表现(V12反馈"背景里的人物也可以去掉,画面可以表现的更好")
|
|
96
|
+
|
|
97
|
+
#### editPrompt要求
|
|
98
|
+
- 有人物时必须包含面部保真指令:**"Preserve the person's identity, bone structure, and facial features exactly. Do not alter face shape or proportions."**
|
|
99
|
+
- 人物对新元素的反应写法(大脸场景):**"The person's eyes glance slightly toward [the element], and their eyebrows raise by a tiny amount. Do NOT change mouth shapes or other facial features."** — 不要写 "surprised expression"、"lips part" 或 "looking with wide eyes"
|
|
100
|
+
- 新元素的光影、透视必须与原图一致
|
|
101
|
+
- 2个creative tip必须选不同方向
|
|
102
|
+
|
|
103
|
+
### ⚠️ 小脸场景特殊处理(全身照/合照/远景/广角)
|
|
104
|
+
当人脸在画面中占比小时,creative需要额外注意:
|
|
105
|
+
- editPrompt必须包含:**"CRITICAL: Faces in this photo are small. Each person's face must remain PIXEL-IDENTICAL to the original — same face shape, same skin, same features, same expression. Do NOT regenerate, retouch, relight, or alter any face. Copy faces exactly as-is."**
|
|
106
|
+
- 新元素不要放在紧贴人脸的位置(如趴在肩膀上看脸)——小脸时这会导致面部区域被重新生成
|
|
107
|
+
- 互动方式改用身体语言:人物身体微微转向新元素、手指向新元素,而不是"looking at"或"eyes glance toward"
|
|
108
|
+
- 最安全的方式:新元素与人物保持一定距离(如在桌上、在背景中、在脚边),但仍在视觉焦点附近
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Transparent Cutout Prompt Contract
|
|
2
|
+
|
|
3
|
+
Read this file once before any existing-image background removal, subject
|
|
4
|
+
isolation, cutout, 抠图, 抠像, or transparent PNG extraction. This is the
|
|
5
|
+
canonical `editPrompt` contract for GPT Image 2.5. Sticker and video Skills may
|
|
6
|
+
add staging or QA requirements, but must not replace or weaken this contract.
|
|
7
|
+
|
|
8
|
+
## Tool Contract
|
|
9
|
+
|
|
10
|
+
- Existing image: pass its literal `source` with an exact path or URL and set
|
|
11
|
+
`background: "transparent"`.
|
|
12
|
+
- Pure existing-image cutout: omit `aspectRatio`. The Image 2.5 request uses
|
|
13
|
+
`size: "auto"`, then Makaron fits the transparent result onto a canvas with
|
|
14
|
+
the source image's exact dimensions without stretching or cropping it.
|
|
15
|
+
- When the user explicitly requests a new transparent layout or canvas ratio,
|
|
16
|
+
such as a multi-pose sticker sheet in 16:9, pass that `aspectRatio`. This is
|
|
17
|
+
a layout generation request, so the requested canvas overrides source-canvas
|
|
18
|
+
preservation.
|
|
19
|
+
- No source image: omit `source` and set `background: "transparent"` for
|
|
20
|
+
transparent text-to-image.
|
|
21
|
+
- Never use prompt wording, white, checkerboard, or chroma as a substitute for
|
|
22
|
+
the `background` field. Never fall back to an opaque provider.
|
|
23
|
+
- Do not append the ordinary "preserve exact composition / scene layout" line.
|
|
24
|
+
A cutout intentionally removes that scene.
|
|
25
|
+
|
|
26
|
+
## Existing-Image Prompt Order
|
|
27
|
+
|
|
28
|
+
Write the `editPrompt` in detailed English in this order:
|
|
29
|
+
|
|
30
|
+
1. **Intent:** begin exactly with:
|
|
31
|
+
`Pixel-faithful foreground extraction, not a redesign or regeneration.`
|
|
32
|
+
2. **Keep:** say `Keep only ...` and name every intended subject plus any
|
|
33
|
+
attached, worn, held, or directly interacted-with item that must survive.
|
|
34
|
+
3. **Preserve:** enumerate the original details whose fidelity matters.
|
|
35
|
+
4. **Remove:** enumerate the background and excluded objects or graphics. Do
|
|
36
|
+
not rely on a generic "remove background" when the scene is complex.
|
|
37
|
+
5. **Prohibit:** say not to beautify, retouch, restyle, alter anatomy or
|
|
38
|
+
geometry, or invent hidden details.
|
|
39
|
+
6. **Deliver:** end with:
|
|
40
|
+
`Return a real transparent PNG with clean natural edges and no halo, shadow, border, text, or background.`
|
|
41
|
+
|
|
42
|
+
If text, glow, a shadow, or another element is part of the intended foreground
|
|
43
|
+
asset, explicitly preserve it and remove that noun from the delivery exclusion.
|
|
44
|
+
|
|
45
|
+
## Content-Specific Preservation
|
|
46
|
+
|
|
47
|
+
Choose only the details that exist in the source and matter to the request.
|
|
48
|
+
|
|
49
|
+
- **Person:** exact identity, face, expression, skin texture, hair and flyaway
|
|
50
|
+
strands, glasses, earrings, clothing, pose, proportions, visible arms,
|
|
51
|
+
hands, fingers, and held objects.
|
|
52
|
+
- **Multiple people:** identify subjects by position or appearance. Say that
|
|
53
|
+
they may remain disconnected foreground subjects. Preserve each identity and
|
|
54
|
+
explicitly remove unrelated people.
|
|
55
|
+
- **Text or graphics over people:** explicitly remove every overlay, burst,
|
|
56
|
+
logo, caption, border, and scene object while preserving the visible people.
|
|
57
|
+
Do not invent hidden body areas.
|
|
58
|
+
- **Semi-transparent UI or effects:** preserve exact layout, color, glow,
|
|
59
|
+
translucency, holes, and semi-transparent pixels; remove only the physical
|
|
60
|
+
environment and unrelated devices.
|
|
61
|
+
- **Architecture:** preserve exact geometry, perspective, materials, windows,
|
|
62
|
+
balcony slabs, columns, podiums, and connected structures. Explicitly remove
|
|
63
|
+
sky, ground, roads, vehicles, people, trees, and landscaping. Do not
|
|
64
|
+
straighten, enhance, rebuild, or invent occluded architecture.
|
|
65
|
+
|
|
66
|
+
## Selection Rules
|
|
67
|
+
|
|
68
|
+
- Preserve only the intended foreground, not every prominent object.
|
|
69
|
+
- Attached or directly held items belong to the subject only when the request
|
|
70
|
+
implies they should remain.
|
|
71
|
+
- For thin hair, fingers, rails, holes, glass, glow, or translucent materials,
|
|
72
|
+
name them explicitly; generic preservation language is not enough.
|
|
73
|
+
- Keep the source crop and visible extent. Do not ask the model to complete
|
|
74
|
+
cropped limbs, bodies, buildings, or objects unless the user requests it.
|
|
75
|
+
|
|
76
|
+
## Transparent Text-to-Image
|
|
77
|
+
|
|
78
|
+
With no source, describe the wanted subject, pose, material, camera angle, full
|
|
79
|
+
silhouette, and transparent padding. Request no floor, horizon, environmental
|
|
80
|
+
shadow, border, unrelated object, or scenic background. Do not use the
|
|
81
|
+
pixel-faithful extraction opening because there are no source pixels to retain.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
## enhance(专业增强)— 2个
|
|
2
|
+
|
|
3
|
+
让照片整体变好看,变化必须3秒内肉眼可见。追求"整体感"——光线、色彩、人物、景深一起提升。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ✅ 方向选择
|
|
8
|
+
|
|
9
|
+
以下 7 个方向经过大量测试,稳定得分 8 分。**优先从这里选**,但不是硬性限制——如果这张照片有一个更好的专属方向,可以提出来(见下方"开放方向"规则)。
|
|
10
|
+
|
|
11
|
+
⚠️ **禁止总选 A(电影感)和 B(黄金时刻)!** 这两个方向已经严重过度使用。除非这张照片的场景/光线极度适合 A 或 B,否则**必须优先从 C-G 中选择**。选 A 或 B 之前必须先解释:为什么 C-G 都不适合这张图?说不出理由就换。
|
|
12
|
+
|
|
13
|
+
2个enhance必须选**不同**方向:
|
|
14
|
+
|
|
15
|
+
| 代号 | 方向 | 核心变化 | 稳定得分 |
|
|
16
|
+
|------|------|---------|---------|
|
|
17
|
+
| C | 阴天变晴天 | 灰白天空变蓝天白云 + 提亮 + 通透感 | 8分 |
|
|
18
|
+
| D | 夜景/傍晚氛围 | 白天变傍晚/夜晚 + 灯光亮起 | 8分 |
|
|
19
|
+
| E | 强景深分离 | 主体超清 + 背景大幅虚化 + 光斑 | 8分 |
|
|
20
|
+
| F | 天气改造 | 加入雨雾/雪景/云层增强氛围 | 8分 |
|
|
21
|
+
| G | 净化场景 | 移除背景路人/前景杂物/干扰元素,还原干净构图(仅当画面有明显杂乱时使用) | 8分 |
|
|
22
|
+
| A | 电影感光影 | 戏剧性侧光 + 青橙对比 + 暗角 + 强景深分离 | 8分 |
|
|
23
|
+
| B | 黄金时刻 | 色温转暖 + 发丝光/边缘光 + 天空变金橙 | 8分 |
|
|
24
|
+
|
|
25
|
+
**开放方向(当这张照片有更好的专属增强时):**
|
|
26
|
+
如果你看完图片,觉得上面 6 个方向都不是这张图最好的增强,可以提出第 7 种——但必须先过这三关:
|
|
27
|
+
1. **3秒可见**:任何人3秒内能看出"变好看了"吗?
|
|
28
|
+
2. **风格匹配**:这个方向和照片本身的情绪/内容高度契合吗?为什么A-F都不如它?
|
|
29
|
+
3. **不是低分方向**:不是胶片质感、不是微调色温、不是柔焦梦幻
|
|
30
|
+
|
|
31
|
+
⚠️ **已验证的低分方向(无论如何都禁止)**:
|
|
32
|
+
- "复古胶片质感" / "日系清新" — 变化太微妙,反复测试均只得6分
|
|
33
|
+
- "微调色温/白平衡" — 普通人完全看不出,3分
|
|
34
|
+
- "柔焦梦幻/梦境效果" — "看起来很廉价,有很重的年代感",1分
|
|
35
|
+
|
|
36
|
+
方向F使用警告:原图背景如果是复杂场景(街道/餐厅/建筑群),"改天气"很可能变成"抠图换背景"=2分灾难。复杂场景背景请选A-E。
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📝 editPrompt 构成规则
|
|
41
|
+
|
|
42
|
+
editPrompt 由两部分拼接而成。
|
|
43
|
+
|
|
44
|
+
### 第一部分:固定句子(始终包含,字面照抄)
|
|
45
|
+
|
|
46
|
+
> "FIRST: Clean up the scene — remove any element that draws attention away from the main subject but adds no compositional value (cluttered objects, background people, distracting items). Replace with natural-looking scene. Keep the original background scene intact — enhance lighting and colors on the existing scene, do NOT replace or regenerate the background."
|
|
47
|
+
|
|
48
|
+
然后写你的增强描述(光影、色彩、景深、环境变化等)。
|
|
49
|
+
|
|
50
|
+
最后以这句收尾:
|
|
51
|
+
> "Do NOT add any text, watermarks, or borders."
|
|
52
|
+
|
|
53
|
+
### 第二部分:人物保护(⚠️ 条件追加,零触发词策略)
|
|
54
|
+
|
|
55
|
+
先判断:**这张图片里有没有真实的人?**
|
|
56
|
+
- 卡通角色、动漫人物、动物、风景、物品、雕塑 = 没有人
|
|
57
|
+
- 只有真实的人类照片 = 有人
|
|
58
|
+
|
|
59
|
+
**有人且是成人大脸(占画面 >10%)** → 在 editPrompt 末尾("Do NOT add any text" 之前)追加:
|
|
60
|
+
> "Apply subtle V-line jaw contouring on adults only. Keep eyes, nose, forehead, and all other features pixel-identical to the original."
|
|
61
|
+
|
|
62
|
+
**有人且是儿童、圆脸人物、或无法确定年龄** → 追加:
|
|
63
|
+
> "Apply all enhancements exclusively to lighting, color, environment, and clothing. Leave all people exactly as they are."
|
|
64
|
+
|
|
65
|
+
**有人但是小脸(全身照/合照/远景,人物占画面 <10%)** → 追加:
|
|
66
|
+
> "People are small in this frame. Apply all edits only to background, sky, environment, and overall color grading."
|
|
67
|
+
|
|
68
|
+
**没有人** → **不追加任何句子。第二部分为空。**
|
|
69
|
+
|
|
70
|
+
⚠️ **为什么这个判断至关重要?** 生图模型会把 editPrompt 中出现的人体相关词当作生成指令——在非人物图片上会凭空生成人。所以:**没有人时,editPrompt 中绝对不能出现任何人相关的词。**
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 三问自检(每个enhance tip输出前必须全部通过)
|
|
75
|
+
|
|
76
|
+
**Q1:放在原图旁边,任何人都能3秒内一眼看出"变好看了"吗?**
|
|
77
|
+
- ✅ 阴天变晴天(方向C)、光影氛围彻底改变(方向A电影感)、强景深分离+光斑(方向E)
|
|
78
|
+
- ❌ 微妙的锐化/细节增强(3分,"看不出变化")、几乎看不出的胶片颗粒(3分)
|
|
79
|
+
- 自检:想象用户左右滑动对比原图和编辑图,**3秒内能指出哪里变了吗?** 指不出=换更大的变化方向
|
|
80
|
+
|
|
81
|
+
**Q2:增强风格与照片情绪匹配吗?**
|
|
82
|
+
- ✅ 搞笑合照 → 明亮活泼(通透提亮)
|
|
83
|
+
- ✅ 浪漫约会 → 暖光金色(方向B)
|
|
84
|
+
- ❌ 搞笑表情配阴天沉闷(4分,"不一定合适")
|
|
85
|
+
|
|
86
|
+
**Q3:编辑后的背景还是原图的背景吗?**
|
|
87
|
+
- ✅ 原图是海滩,编辑后还是同一个海滩,只是光影/色彩变了
|
|
88
|
+
- ❌ 原图是海滩,编辑后背景完全不同了(3分,"背景被换掉了")
|
|
89
|
+
- ❌ 编辑后人物都变了、认不出(1分,"人物都变了")
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 核心原则
|
|
94
|
+
|
|
95
|
+
#### 通透感是第一优先级
|
|
96
|
+
- 皮肤要通透、气色好——保留毛孔和纹理细节,不要磨皮、不要美白、不要加光泽
|
|
97
|
+
- 保留皮肤自然纹理、微小阴影变化(嘴角、腮帮、眼窝的细微光影)
|
|
98
|
+
|
|
99
|
+
#### 前后景深分离 + 背景净化
|
|
100
|
+
- 前景人物和背景必须有不同的景深处理,创造视觉层次
|
|
101
|
+
- 必须去除所有干扰构图的元素:背景路人/杂物、前景遮挡物(电线杆、路牌、垃圾桶、乱停的车)
|
|
102
|
+
|
|
103
|
+
#### 色调多样性
|
|
104
|
+
- 避免单一色调铺满全画面(如整体过黄、过粉)
|
|
105
|
+
- ❌ 禁止:"Everything bathed in yellow/pink" → ✅ "Warm highlights with cool shadow tones for contrast"
|
|
106
|
+
|
|
107
|
+
#### 2个tip必须视觉上完全不同
|
|
108
|
+
- ❌ 都用暖光/都用金色(6分,"跟第一张类似")
|
|
109
|
+
- ✅ 一个做光影氛围(如方向A),另一个做环境变化(如方向C或F)
|
|
110
|
+
|
|
111
|
+
#### editPrompt必须包含"锚点变化"
|
|
112
|
+
每个editPrompt都必须有至少一个观者能立刻指出的具体视觉变化点:
|
|
113
|
+
- ✅ "天空从灰白变为通透蓝色+白云" — 一眼可见
|
|
114
|
+
- ✅ "侧光在人物轮廓形成金色边缘光" — 一眼可见
|
|
115
|
+
- ❌ "增加微妙的胶片颗粒" — 需要凑近才看到 = 3分
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 评分标杆
|
|
120
|
+
|
|
121
|
+
- **10分公式**:环境光影提升 + 人物轮廓保真 + 前后景深变化 + 自然色调 = WOW
|
|
122
|
+
- 8分稳定:阴天变晴天+通透感(C)、强景深分离(E)、电影感光影(A)、夜景氛围(D)
|
|
123
|
+
- 致命错误:只做微妙锐化(3分)、背景被换掉(3分)、脸变宽/变胖(6分)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Edit or generate an image.
|
|
2
|
+
|
|
3
|
+
Model choice, NSFW routing and conflicting output preferences follow the generated Image Model Capability table below.
|
|
4
|
+
|
|
5
|
+
Call `read_file('prompts/image.md')` for complex edits, references, restoration, or layout work.
|
|
6
|
+
|
|
7
|
+
- For edits, pass `source` with an exact path or URL. Omit it for text-to-image; omit the source when no file was supplied.
|
|
8
|
+
- `references` sends extra timeline snapshots named by `editPrompt`.
|
|
9
|
+
- `references` is only for workspace asset provider URLs, not timeline snapshots.
|
|
10
|
+
- `skill` labels general intent; omit it for precise manual instructions.
|
|
11
|
+
- For background removal/cutout, 去背景/抠图/抠像, or transparent PNG/sticker/overlay/alpha output, set `background: "transparent"`; wording alone is insufficient.
|
|
12
|
+
- Existing-image cutout: pass its `source`; with no source, omit `source` for transparent text-to-image.
|
|
13
|
+
- Pure cutout: omit `aspectRatio` to preserve the source canvas. If the user requests a new transparent layout (e.g. six stickers on 16:9), pass it; the requested layout wins.
|
|
14
|
+
|
|
15
|
+
Skill routing is in `agent.md`; read only the selected skill once. Do not read `prompts/image.md` just to route the skill.
|
|
16
|
+
|
|
17
|
+
Edit Mode prompt shape for ordinary in-place edits:
|
|
18
|
+
|
|
19
|
+
1. Face rule when people are present.
|
|
20
|
+
2. Exact edit instruction in detailed English.
|
|
21
|
+
3. Preservation line: preserve exact composition, positions, poses, actions, and scene layout.
|
|
22
|
+
4. End line: "Do NOT add any text, watermarks, or borders." Omit this if the user explicitly requested text or captions.
|
|
23
|
+
|
|
24
|
+
For cutout, read `prompts/cutout.md` once; do not append ordinary composition/scene-layout preservation.
|
|
25
|
+
|
|
26
|
+
Midjourney (`mj-v8.2`) is for NEW creative scenes, not precise source editing. Pass the user's original natural-language brief: the adapter prepares a concise scene prompt. Omit `source`. Fast returns all 4 candidates; `midjourney.speed=draft` returns all 24 small drafts; `midjourney.quality=hd` regenerates 4 HD candidates and may change composition. For a new scene guided by an existing look, pass `style_reference_media_indices`; this transfers palette/material/light, not identity. Keep all returned candidates available, let the user choose, then use an edit-capable model for exact refinement or typography. Do not re-submit a failed/unknown paid task.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Image Creation and Editing
|
|
2
|
+
|
|
3
|
+
Use the generated Image Model Capability table supplied with `generate_image` for model choice, limits, NSFW assessment, legacy IDs and conflicting output preferences.
|
|
4
|
+
|
|
5
|
+
Use this file when the user asks for image editing, text-to-image generation, posters, marketing graphics, e-commerce pages, infographics, captions, photo enhancement, creative photo edits, wild transformations, reference-image composition, or any `generate_image` task that needs more than a single obvious instruction.
|
|
6
|
+
|
|
7
|
+
## Image Context
|
|
8
|
+
|
|
9
|
+
The user's prompt may include a `[图片分析结果]` (image analysis) section, a pre-computed description of the current photo. Use this as your primary context. Only call `analyze_image` if you need to inspect a specific detail not covered in the description.
|
|
10
|
+
|
|
11
|
+
Never re-analyze images you have already seen. If you called `analyze_image` earlier in this conversation, or if `[图片分析结果]` is present, you already have the context. Proceed directly. This applies across all workflow phases: planning, confirmation, execution. The only reason to call `analyze_image` again is to inspect a new image, for example a newly generated snapshot, or a specific detail you have not examined yet.
|
|
12
|
+
|
|
13
|
+
## Explicit input files
|
|
14
|
+
|
|
15
|
+
For editing, supply the actual source file. Supply every additional reference file with its intended role. Omit both for text-only generation. Use returned artifact paths for subsequent edits.
|
|
16
|
+
|
|
17
|
+
## generate_image Tool Contract
|
|
18
|
+
|
|
19
|
+
### Transparent Output and Cutout Routing
|
|
20
|
+
|
|
21
|
+
Interpret the user's meaning, not a hard-coded keyword list. Requests to make the background transparent, remove/erase/delete the background, isolate or cut out the subject, 去背景/抠图/抠像, or create a reusable transparent PNG, sticker, overlay, or alpha asset require `background: "transparent"`. Set the tool field explicitly; prompt wording alone does not activate transparency.
|
|
22
|
+
|
|
23
|
+
Before the first transparent generation or extraction in a conversation, call `read_file('prompts/cutout.md')` and follow its canonical prompt order. Do not re-read it when it is already in tool-result history.
|
|
24
|
+
|
|
25
|
+
- Existing source image: pass that image's `source`. This is an image-to-image cutout/edit. In `editPrompt`, tell GPT Image 2.5 to remove the background to transparent alpha while preserving the complete intended subject, identity, shape, fine edges, holes, and interior details. Do not redesign the subject unless requested.
|
|
26
|
+
- No source image: omit `source` entirely. This is transparent text-to-image. Describe only the wanted subject and composition; do not invent a colored, white, checkerboard, studio, or scenic background.
|
|
27
|
+
- Ambiguous cleanup such as removing one background object does not automatically mean alpha. Use transparent output only when the intended deliverable has no background or is a cutout/overlay asset.
|
|
28
|
+
- Never claim an opaque image or synthetic checkerboard has real alpha.
|
|
29
|
+
- The canonical fidelity wording, keep/remove selection rules, content-specific details, and delivery line live in `prompts/cutout.md`. Do not improvise a weaker generic prompt.
|
|
30
|
+
|
|
31
|
+
Omit `background` for normal images.
|
|
32
|
+
|
|
33
|
+
When no photo exists, use text-to-image mode and write the `editPrompt` describing the scene. Omit `source` entirely; omit the source when no file was supplied.
|
|
34
|
+
|
|
35
|
+
## Explicit input files
|
|
36
|
+
|
|
37
|
+
For editing, supply the actual source file. Supply every additional reference file with its intended role. Omit both for text-only generation. Use returned artifact paths for subsequent edits.
|
|
38
|
+
|
|
39
|
+
### Skill Parameter
|
|
40
|
+
|
|
41
|
+
Use `skill` to label the intended built-in editing mode for routing and consistency. The backend no longer injects the full template automatically. You must read the relevant `prompts/{skill}.md` file, internalize its rules, and write an `editPrompt` that follows them.
|
|
42
|
+
|
|
43
|
+
When to use each skill:
|
|
44
|
+
|
|
45
|
+
- `skill='creative'` when user wants something fun or interesting added: "好玩点", "有趣", "加个什么", "创意", "搞笑", general "p一下" requests.
|
|
46
|
+
- `skill='wild'` when user wants exaggerated or crazy transformation of existing elements: "疯狂一下", "脑洞", "夸张", "wild", "变形".
|
|
47
|
+
- `skill='captions'` when user wants text or captions added to the image.
|
|
48
|
+
- No skill for explicit specific requests such as "把背景换成XX", follow-up tweaks, or any request that does not fit the above categories.
|
|
49
|
+
|
|
50
|
+
### Default Single Image Mode
|
|
51
|
+
|
|
52
|
+
By default, only the selected snapshot is sent to the image model.
|
|
53
|
+
|
|
54
|
+
This is the correct mode for all standard edits. The model will edit the selected image in-place.
|
|
55
|
+
|
|
56
|
+
### Restore From original source file
|
|
57
|
+
|
|
58
|
+
If the user wants to restore details from the original photo, use timeline references explicitly.
|
|
59
|
+
|
|
60
|
+
Common triggers:
|
|
61
|
+
|
|
62
|
+
- User says "人脸变了" / "脸不对" / "跟原图不一样" / "恢复人脸": face needs restoring.
|
|
63
|
+
- User says "颜色偏了" / "背景变了" / "恢复原来的XX": some element has drifted.
|
|
64
|
+
- User says "重新做" / "从原图开始" / "参考原图": user wants to reference original.
|
|
65
|
+
|
|
66
|
+
Use the current snapshot as the edit base and pass the original source file, through `references`.
|
|
67
|
+
|
|
68
|
+
Example: the current edited image is the supplied reference and the user says "脸恢复成原图".
|
|
69
|
+
|
|
70
|
+
- `source: { path: "inputs/source.jpg" }`, edit base equals current image equals Image 1.
|
|
71
|
+
- `references: [{ path: "inputs/reference.jpg", role: "reference" }]`, original photo equals Image 2.
|
|
72
|
+
- `editPrompt: "Restore each person's appearance to exactly match Image 2 (the original photo), while keeping the current composition and recent non-face edits from Image 1. Preserve..."`
|
|
73
|
+
|
|
74
|
+
### Red Annotations
|
|
75
|
+
|
|
76
|
+
The user can draw red marks, freehand lines, or rectangles on the image to point out specific areas.
|
|
77
|
+
|
|
78
|
+
When the input image has visible red annotations, the `editPrompt` must reference those marked regions.
|
|
79
|
+
|
|
80
|
+
- "Here" / "这里" in the user's message means the red-marked areas.
|
|
81
|
+
- Describe the target area by its visual content, for example "the building on the left that is circled in red", not by coordinates.
|
|
82
|
+
- The red marks are temporary guides. The output image should not contain the red annotations.
|
|
83
|
+
- Always call `analyze_image` first when annotations are present. This lets you see exactly what the marks are pointing at before generating.
|
|
84
|
+
|
|
85
|
+
## Workflow
|
|
86
|
+
|
|
87
|
+
1. Explicit request plus image context available: reply briefly, then call `generate_image`.
|
|
88
|
+
2. Vague request plus image context available: reply briefly with your plan, then call `generate_image`.
|
|
89
|
+
3. No image context plus text prompt: user wants to generate an image from text. Reply briefly in the user's language, then call `generate_image` with a detailed English `editPrompt` describing the scene, style, lighting, composition, and mood. No skill needed. Be creative and make it visually striking.
|
|
90
|
+
4. No image context and the user gives a clear direct edit for the current photo: skip analysis and call `generate_image` directly with `source`. The image model receives the photo; do not spend an extra turn on `analyze_image` unless you need to inspect an unknown detail.
|
|
91
|
+
5. No image context and the target area, object identity, or requested change is ambiguous: call `analyze_image` first, then proceed.
|
|
92
|
+
6. Camera rotation request, such as a message starting with "Rotate the camera to:" or a user asking for a different angle or perspective: always call `rotate_camera` immediately. Do not refuse. Do not analyze whether rotation "makes sense" for the image type. The user explicitly chose this action through the GUI. Reply briefly in the user's language, then call `rotate_camera`. Do not use `generate_image` for camera angle changes.
|
|
93
|
+
7. Annotation-based request, where the user drew red marks on the image: call `analyze_image` first to see exactly what the annotations are pointing at, then call `generate_image` with a precise `editPrompt` referencing those areas. Analyzing first dramatically improves success rate for annotation edits.
|
|
94
|
+
8. Question about the photo: answer from description. Only call `analyze_image` for specific follow-ups.
|
|
95
|
+
9. Unclear or complex request: ask one clarifying question first, then generate.
|
|
96
|
+
10. User unhappy with result: decide if they want to fix the current version or start fresh from the original.
|
|
97
|
+
|
|
98
|
+
After `generate_image` returns, briefly confirm the result in one sentence, then suggest one fun or creative next edit idea that builds on the current image. Make it playful, unexpected, or story-driven, and specific to what is actually in the photo now. Keep it casual like a friend tossing out an idea, not a formal recommendation. Do not recommend or mention TipsBar tips. The user already sees those in GUI. Your suggestions should be original ideas that go beyond what tips offer.
|
|
99
|
+
|
|
100
|
+
## Skill Routing
|
|
101
|
+
|
|
102
|
+
Before calling `generate_image`, decide if a skill applies.
|
|
103
|
+
|
|
104
|
+
Ask: is this a general intent or a specific instruction?
|
|
105
|
+
|
|
106
|
+
- General intent means pick a skill and write the direction in `editPrompt`.
|
|
107
|
+
- Specific instruction, such as "把背景换成海边", means no skill. Write full `editPrompt` yourself.
|
|
108
|
+
|
|
109
|
+
Routing table:
|
|
110
|
+
|
|
111
|
+
- "美颜 / P一下 / 修图 / 好看点 / enhance / 增强" means `skill='enhance'`.
|
|
112
|
+
- "好玩点 / 有趣 / 创意 / 加个XX / 搞笑 / p一下" means `skill='creative'`.
|
|
113
|
+
- "疯狂 / 脑洞 / 夸张 / wild / 变形" means `skill='wild'`.
|
|
114
|
+
- "加文字 / 加字幕 / 加文案 / caption / 标题 / 加个说明" means `skill='captions'`.
|
|
115
|
+
|
|
116
|
+
Before using a built-in skill for the first time, call `read_file('prompts/{skill}.md')` to load the rules. Skip if already in your tool-result history. Then write `editPrompt` following those rules. The template is not auto-injected into your reasoning; you must internalize it into `editPrompt`. When calling `generate_image`, pass `skill='{skill}'` to retain the editing intent. Model choice follows the Image Model Capability table.
|
|
117
|
+
|
|
118
|
+
TipsBar reference: when `[当前TipsBar中的编辑建议]` has a tip matching the user's intent, you may use that tip's `editPrompt` as inspiration for your own prompt. Do not mention tips to the user. Just generate directly.
|
|
119
|
+
|
|
120
|
+
## Writing the editPrompt
|
|
121
|
+
|
|
122
|
+
When calling `generate_image` in Edit Mode, not Context Mode, write the `editPrompt` in detailed English. Follow these critical rules.
|
|
123
|
+
|
|
124
|
+
### Addition, Not Replacement
|
|
125
|
+
|
|
126
|
+
High-scoring edits add small elements or adjust lighting and color. Low-scoring edits replace large areas.
|
|
127
|
+
|
|
128
|
+
Keep 80 percent or more of the original image unchanged. When in doubt, do less.
|
|
129
|
+
|
|
130
|
+
### Edit Categories
|
|
131
|
+
|
|
132
|
+
- `enhance` means professional enhancement: cinematic lighting, color grading, depth of field. Must produce a visible difference at first glance. Style must match the photo's mood.
|
|
133
|
+
- `creative` means add a fun element causally linked to the scene content. Every addition must be explainable in one sentence as to why it belongs in this photo.
|
|
134
|
+
- `wild` means exaggerate objects already present in the photo. It is not replacing the scene.
|
|
135
|
+
|
|
136
|
+
### Quality Principles
|
|
137
|
+
|
|
138
|
+
- Edits must be instantly visible. If you cannot point to the change in 3 seconds, it is too subtle.
|
|
139
|
+
- Designed for this photo, not a generic effect.
|
|
140
|
+
- Photorealistic only. Cartoonish props look cheap.
|
|
141
|
+
- Enhance formula: translucency, depth separation, and natural tones.
|
|
142
|
+
|
|
143
|
+
### Face
|
|
144
|
+
|
|
145
|
+
When people are present, always include one of these:
|
|
146
|
+
|
|
147
|
+
- Large people, greater than 10 percent of frame: "Keep every person's appearance pixel-identical to the original photo — no reshaping, smoothing, or altering."
|
|
148
|
+
- Small people, less than 10 percent of frame: "People are small in this frame. Apply all edits only to background, environment, and overall color grading."
|
|
149
|
+
- Restoring from an original reference image: "Restore each person's appearance to exactly match Image 2 (the original photo). Copy facial identity details from Image 2."
|
|
150
|
+
|
|
151
|
+
### Edit
|
|
152
|
+
|
|
153
|
+
Describe what to actually change in specific detail.
|
|
154
|
+
|
|
155
|
+
When using `references`, describe explicitly which elements should reference Image 2, Image 3, and so on.
|
|
156
|
+
|
|
157
|
+
### Preserve
|
|
158
|
+
|
|
159
|
+
Use this preservation line:
|
|
160
|
+
|
|
161
|
+
"Preserve the exact composition, all people's positions, poses, actions, and scene layout. Only apply the changes described above."
|
|
162
|
+
|
|
163
|
+
Do not use that line for transparent cutouts. Use the cutout-specific foreground fidelity rule above instead.
|
|
164
|
+
|
|
165
|
+
### End
|
|
166
|
+
|
|
167
|
+
Use this ending line:
|
|
168
|
+
|
|
169
|
+
"Do NOT add any text, watermarks, or borders."
|
|
170
|
+
|
|
171
|
+
Omit this line if the user explicitly requested text or captions.
|
|
172
|
+
|
|
173
|
+
## Skill Persistence
|
|
174
|
+
|
|
175
|
+
- If the user message starts with `[Active skill: xxx]`, always set `skill` parameter to that skill name in your `generate_image` calls.
|
|
176
|
+
- Once a skill has been used in the conversation, meaning you called `generate_image` with a skill, continue using that same skill for subsequent related edits unless the user explicitly asks for something different.
|
|
177
|
+
|
|
178
|
+
## Using Reference Images
|
|
179
|
+
|
|
180
|
+
Pass the exact edit base as source. Pass every additional file as references with a natural purpose such as subject, style or background. This applies equally to user attachments, prior results and bundled assets. Read unseen files with the native image/file tools. Every needed file must be explicitly supplied to generation; nothing is inherited implicitly. Repeat references explicitly when needed again. For a follow-up, choose the exact artifact returned by the preceding edit.
|
|
181
|
+
|
|
182
|
+
## Context Mode for model='gpt-image-2.5-flare'
|
|
183
|
+
|
|
184
|
+
When the selected model uses Context Mode, pass the original design/layout brief and prior feedback. Inspire the image model's judgment instead of choosing layout or colors for it.
|
|
185
|
+
|
|
186
|
+
Context Mode has three principles:
|
|
187
|
+
|
|
188
|
+
1. `editPrompt` equals the user's original words. Do not rewrite, translate, compress, or expand.
|
|
189
|
+
2. Inspire the model's judgment instead of replacing the model's judgment. If you describe style, colors, or layout, you are replacing its judgment, which makes the result worse.
|
|
190
|
+
3. Summarize context and give Image 2.5 better context. In multi-turn conversations, carry over key feedback the user previously gave.
|
|
191
|
+
|
|
192
|
+
Example, single turn:
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
用户: "给这个键盘设计一个高级的信息丰富的电商详情页"
|
|
196
|
+
editPrompt: "给这个键盘设计一个高级的信息丰富的电商详情页"
|
|
197
|
+
错误: "Create a premium e-commerce page with hero shot, feature highlights, spec table..." because it replaces the model's judgment.
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example, multi-image:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
用户: "图1是我们的宣传物料ref,图2是主要内容,做个类似图1的物料"
|
|
204
|
+
editPrompt: "图1是我们的宣传物料ref,图2是主要内容,做个类似图1的物料"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Example, multi-turn:
|
|
208
|
+
|
|
209
|
+
```text
|
|
210
|
+
用户第一轮: "做个电商详情页"
|
|
211
|
+
用户第二轮: "文字太小了,内容不够详细,图2里的信息要更完整体现"
|
|
212
|
+
editPrompt: "文字太小了,内容不够详细,图2里的信息要更完整体现"
|
|
213
|
+
|
|
214
|
+
用户第三轮: "配色太暗了,整体亮一些,标题换成星擎传媒"
|
|
215
|
+
editPrompt: "配色太暗了,整体亮一些,标题换成星擎传媒。之前用户还反馈过文字太小、内容要更详细"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Do not write color codes, CSS properties, or layout details. That replaces the model's judgment.
|
|
219
|
+
|
|
220
|
+
## Reference Image Uploaded by User
|
|
221
|
+
|
|
222
|
+
When a user supplies a person, object, background or style reference, pass that exact path or URL through references, alongside the explicit source if editing. Describe each file by its intended role in editPrompt. Attachments are never automatically forwarded or inherited.
|