feat(image): image_with_refs 构图指令 — 抓拍式生活切片 intro + CORLINMAN_IMAGE_REFS_INTRO 开关#153
Merged
Merged
Conversation
…EFS_INTRO 开关 移植 hermes COMPOSITION DIRECTION 到参考图生图工具,让多角色配图 读作随手拍的生活切片而非摆拍合影: - 新增 _COMPOSITION_INTRO(英文,模型侧图像指令,非用户可见): candid slice-of-life 抓拍 / 各角色不同动作与朝向 / 偏轴取景 / 动作进行中的姿态 / 环境杂物增加生活感 / 偷偷·顺手的动作要读得出隐蔽感; 角色写实句 + 画风句写成 persona 通用,画风一律来自上游参考图与 prompt, 不硬编码任何特定画风。 - 新增 _compose_refs_prompt(prompt, chars_used):intro + 按序参考图图例 (Reference image 1 = <label1>, ...) + Scene 段 + 原 prompt(原样置尾)。 - CORLINMAN_IMAGE_REFS_INTRO=off 可禁用(裸 prompt 直穿); 成功包新增 composition_intro: bool。 - dispatcher 仍永不抛异常,corlinman-agent 不 import corlinman-server。
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景 / What
移植 hermes
image_with_refs的 COMPOSITION DIRECTION 构图指令到 corlinman 的参考图生图工具(corlinman_agent.image.dispatch),让多角色 AI 配图读作"随手拍的生活切片"而不是摆拍合影。改动 / Changes
_COMPOSITION_INTRO(新常量,英文,喂给图像模型的指令,非用户可见)覆盖全部要点:_compose_refs_prompt(prompt, chars_used)(新函数)拼装:intro + 按序参考图图例(Reference image 1 = <label1>, ...)+Scene:段 + 原 prompt(原样置尾)。用它替换传给generate_with_refs的裸 prompt。CORLINMAN_IMAGE_REFS_INTRO=off环境开关可禁用(裸 prompt 直穿);成功返回包新增composition_intro: bool。chars_used(真正解析到参考图的 label),编号连续;缺失 label 不入图例。测试
test_image_with_refs.py新增 3 项 + 加固 happy-path:chars_used一致(缺失 label 被丢弃,编号连续)CORLINMAN_IMAGE_REFS_INTRO=off→ 裸 prompt 直穿、composition_intro=false验证(全绿)
ruff check python/packages/corlinman-agent✅mypy python/packages/(strict,609 files)✅lint-imports(2 contracts kept,corlinman-agent 不 import corlinman-server)✅pytest test_image_with_refs.py + test_image_generate.py(35 passed)✅约束遵守