Skip to content

feat: warn when a pose on a nano-banana model ignores --aspect-ratio [ENG-4881] - #27

Merged
yujiaxu-ops merged 2 commits into
mainfrom
yujiaxu/eng-4881
Oct 27, 2026
Merged

yujiaxu-ops merged 2 commits into
mainfrom
yujiaxu/eng-4881

Conversation

@yujiaxu-ops

@yujiaxu-ops yujiaxu-ops commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Linear: ENG-4881

Why

meshyd renders an A/T pose at 3:4 on every non-GPT image model, overriding aspect_ratio without any error or warning. This has been the case since the endpoint's first version (api_image_generation_handlers.go). GPT Image models keep the requested ratio.

Measured live with --aspect-ratio 16:9:

Model Pose Image
nano-banana-2 t-pose 896×1200 (3:4)
gpt-image-2 t-pose 1536×864 (16:9)
nano-banana-2 none 1376×768 (16:9)

The affected CLI models are nano-banana-pro, nano-banana-2-1, nano-banana-2 and nano-banana-2-lite.

What

  • New hook. CreateSpec.warnPayload(payload) returns notes about the merged payload that do not stop the request. They ride in the envelope's warnings, after the payload is validated.
  • The warning. text-to-image and image-to-image use the hook with poseAspectRatioWarnings. When a pose meets a nano-banana model and the ratio is not 3:4 (the 1:1 default included), the envelope carries a pose_aspect_ratio warning, and the request is still sent. Because the check reads the merged payload, pose_mode sent through --data on image-to-image warns too.
  • Help text. --pose-mode help now states the rule.

A live run in pretty mode prints:

warning: nano-banana-2 renders a t-pose image at 3:4, so --aspect-ratio 16:9 is not used; the GPT Image models keep the ratio

Verification

  • pnpm typecheck is clean, and pnpm test passes 646/646.
  • The unit test covers all four nano-banana models, the 1:1 default, an explicit 3:4, no pose, every GPT Image model, and the GPT default.
  • A CLI test checks text-to-image with flags and image-to-image with --data: the warning is in the envelope and both POSTs are sent.

Docs: usage and decision D-084 (the skill stays as is; --help carries the rule).

🤖 Generated with Claude Code

yujiaxu-ops and others added 2 commits October 27, 2026 22:04
…[ENG-4881]

meshyd renders an A/T pose on every non-GPT image model at 3:4 and
silently drops aspect_ratio; GPT Image keeps it. Measured live with
16:9: nano-banana-2 + t-pose 896x1200, gpt-image-2 + t-pose 1536x864,
nano-banana-2 without a pose 1376x768.

text-to-image and image-to-image now add a pose_aspect_ratio warning to
the envelope when a pose meets a nano-banana model and the ratio is not
3:4 (the 1:1 default included); the request is still sent. The check
runs on the merged payload through a new CreateSpec.warnPayload hook,
so pose_mode sent via --data warns too. --pose-mode help says so.

Docs: usage, SKILL.md, decision D-084.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…G-4881]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yujiaxu-ops
yujiaxu-ops merged commit e928b11 into main Oct 27, 2026
5 checks passed
yujiaxu-ops added a commit that referenced this pull request Oct 27, 2026
This is a minor bump because #24, #25 and #26 contain breaking changes.

- #24 (ENG-4877): `-o` saves only the primary files by default, and `--all-assets` saves everything. A file path for `-o` now picks the asset whose format matches the extension.
- #25 (ENG-4878): legacy code and compatibility layers are removed. `--output-schema` and `--ultra-mode` are gone. `-o` uses the same asset keys and file names as `meshy download`. Project metadata is read only at schema_version 2.
- #26 (ENG-4880): image-to-3d and multi-image-to-3d now texture by default, as the API does. `inspect faces --model` counts the faces of a local GLB.
- #27 (ENG-4881): text-to-image and image-to-image warn when a pose on a nano-banana model ignores `--aspect-ratio`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yujiaxu-ops
yujiaxu-ops deleted the yujiaxu/eng-4881 branch October 27, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant