feat(core-ai): edit images with generateImage

Abierto
#343 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@grabbou ya está trabajando en esto.

Desde el 1/11/2026.

  • #372 de @grabbou — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react-native, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
1.4k
Forks
64
Merge medio
11 h 24 min
PR fusionados (30 d)
91

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/ai

Todos los issues de callstackincubator/ai

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.