Skip to content

feat(core-ai): edit images with generateImage - #372

Open
grabbou wants to merge 1 commit into
mainfrom
feat/core-ai-image-to-image
Open

grabbou wants to merge 1 commit into
mainfrom
feat/core-ai-image-to-image

Conversation

@grabbou

@grabbou grabbou commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

generateImage ignored input images and masks without a warning, so an edit request silently came back as a text-to-image result.

The first input image now goes to the FLUX.2 pipeline as its starting image, decoded with its EXIF orientation. FLUX.2 edits through reference tokens rather than noise blending, so strength has no effect. Instead, providerOptions['core-ai'].referenceGrid sets how closely the result follows the image, and defaults to the finest grid the export has. Extra images, masks, and exports without a VAE encoder are left out with a warning.

Fixes #343

Test plan

  • bun test in core-ai: unit tests cover the input mapping and warnings.
  • Compiled the example app for iOS with Core AI.
  • Not run on a device: the hosted FLUX.2 export has no VAE encoder or img2img transformer, so editing needs a re-export first.

🤖 Generated with Claude Code

Pass the first input image to the FLUX.2 pipeline as its starting image,
with a referenceGrid option. Warn about extra images, masks and exports
without image-to-image components instead of silently ignoring them.

Closes #343

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ai Ready Ready Preview Nov 1, 2026 12:27pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 3c7c9460 Deployed Nov 1, 2026 by vercel[bot]
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.

feat(core-ai): edit images with generateImage

1 participant