feat(core-ai): edit images with generateImage

Aperta
#343 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@grabbou ci sta già lavorando.

Dal 1/11/2026.

  • #372 di @grabbou — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react-native, typescript

Direzione di ricerca

Start by reading coreAI.imageModel(...) and generateImage/doGenerate, then trace how CoreAIDiffusion accepts PipelineConfiguration with startingImage and strength and how FLUX.2 klein exports expose supportsImageToImage and img2imgRoutes. Check how options.files carries input images and how EXIF orientation and model-size resizing are handled. Done means image edits use the first image, unsupported inputs produce warnings, the Images and Video docs cover editing, and the hosted FLUX.2 klein export has a harness test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

coreAI.imageModel(...) only generates from text. The CoreAIDiffusion pipeline can also edit an image: PipelineConfiguration takes a startingImage and a strength, and FLUX.2 klein exports have image-to-image routes (supportsImageToImage, img2imgRoutes).

Today generateImage ignores the AI SDK's input images (prompt: { images, text }, which reach the model as options.files) and mask without a warning, so an edit request silently comes back as a text-to-image result.

To do:

  • Pass the first input image to the pipeline as startingImage, decoded with its EXIF orientation applied and resized to the model's size
  • providerOptions['core-ai'].strength (0–1) sets how far the result moves from the image; pick a default below 1 for edits
  • Warn when more than one image is given, when a mask is given (the pipeline has no inpainting), and when the export has no image-to-image route
  • Docs: an image editing section in Images and Video, and a harness test on the hosted FLUX.2 klein export

Until then, doGenerate should at least return an unsupported warning for files and mask.

Lingua principale
TypeScript
Stelle
1.4k
Fork
64
Merge medio
11h 24m
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/ai

Tutte le issue di callstackincubator/ai

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.