feat(core-ai): edit images with generateImage

Đang mở
#343 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@grabbou đang làm issue này rồi.

Từ ngày 1/11/2026.

  • #372 của @grabbou — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react-native, typescript

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
1.4k
Fork
64
Merge trung bình
11 giờ 24 phút
Pull request đã merge (30 ngày)
91

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstackincubator/ai

Tất cả issue của callstackincubator/ai

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.