Skip to content

Conversation

@Torantulino
Copy link
Member

@Torantulino Torantulino commented Nov 24, 2025

  • Added store_media_file utility to convert local file paths to Data URIs for image processing.
  • Updated AIImageCustomizerBlock to utilize processed images in model execution, improving compatibility with Replicate API.
  • Added optional Aspect ratio input to AIImageCustomizerBlock

This change enhances the image handling capabilities of the AI image customizer, ensuring that images are properly formatted for external processing.

Changes 🏗️

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • Created agent using AI Image Customizer block attached to agent file input
    • Run agent, confirmed block is working
    • Confirm block is still working in original direct file upload setup.

Testing Results

Before (dev cloud):

image

After (local):

image

Note

Preprocesses input images to data URIs and adds an aspect_ratio option, wiring both through to Replicate in AIImageCustomizerBlock.

  • Backend
    • backend/blocks/ai_image_customizer.py:
      • Preprocesses input images via store_media_file(..., return_content=True) to Data URIs before invoking Replicate.
      • Adds AspectRatio enum and aspect_ratio input; passed through run_model and included in Replicate input.
      • Updates block test input accordingly.

Written by Cursor Bugbot for commit 4116cf8. This will update automatically on new commits. Configure here.

- Added `store_media_file` utility to convert local file paths to Data URIs for image processing.
- Updated `AIImageCustomizerBlock` to utilize processed images in model execution, improving compatibility with Replicate API.

This change enhances the image handling capabilities of the AI image customizer, ensuring that images are properly formatted for external processing.
@Torantulino Torantulino requested a review from a team as a code owner November 24, 2025 20:40
@Torantulino Torantulino requested review from Bentlybro and Pwuts and removed request for a team November 24, 2025 20:40
@github-project-automation github-project-automation bot moved this to 🆕 Needs initial review in AutoGPT development kanban Nov 24, 2025
@github-actions
Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@netlify
Copy link

netlify bot commented Nov 24, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 4116cf8
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs/deploys/69275d219d0f5d0008d37343

@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch toran/open-2839-aiimagecustomizerblock-sends-raw-file-paths-instead-of-valid

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot changed the base branch from master to dev November 24, 2025 20:41
@netlify
Copy link

netlify bot commented Nov 24, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 4116cf8
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs-dev/deploys/69275d21821fae00091b2c46

@AutoGPT-Agent
Copy link

Thanks for this improvement to the AI image customizer functionality!

Your implementation looks good - I like that you're properly passing the user_id parameter to ensure proper security controls, and the enhancement will definitely improve compatibility with the Replicate API.

Before this can be merged, please:

  1. Complete the checklist in the PR description
  2. Add a test plan describing how you've verified this functionality works
  3. Expand the "Changes" section to provide more details about what you've modified

Specifically, for the test plan, consider including steps to verify that:

  • Images are properly converted from local paths to data URIs
  • The AI image customizer works correctly with the processed images
  • Any edge cases (large files, different image formats) are handled properly

@AutoGPT-Agent
Copy link

Thank you for your PR enhancing the AI Image Customizer functionality. Before this can be merged, there are a few issues that need addressing:

  1. Incomplete PR Description: While you've provided a brief overview of what was changed, please expand the description to include more details about why this change was needed and what specific problem it solves.

  2. Checklist Not Completed: None of the checklist items have been checked. Please complete the checklist by checking off all applicable items. At minimum:

    • Check that you've clearly listed your changes
    • Create and document a test plan
    • Confirm you've tested according to that plan
  3. Missing Test Plan: Please add a specific test plan explaining how you've verified that your changes work correctly. For example, describe how you tested the image handling with the Replicate API.

Once these documentation issues are addressed, the PR looks technically sound and within scope of the stated changes.

@deepsource-io
Copy link

deepsource-io bot commented Nov 24, 2025

Here's the code health analysis summary for commits bdb94a3..4116cf8. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@AutoGPT-Agent
Copy link

Thank you for submitting this PR to enhance the AI image customization functionality! The code changes look reasonable and I can see you're properly handling the user_id parameter in the function calls.

However, before we can proceed with merging, please complete the PR checklist in the description. None of the checklist items are currently checked off, which is required by our process.

Specifically:

  • Check off that you've clearly listed your changes
  • Confirm you've made a test plan
  • Provide and check off the steps in your test plan

Since this is a functional change to how images are processed, a test plan is particularly important to ensure everything works as expected.

Once you've completed the checklist, we'll be able to continue with the review process.

@Torantulino
Copy link
Member Author

@claude please review this pr

Torantulino and others added 2 commits November 25, 2025 12:25
- Introduced `AspectRatio` enum to define various aspect ratios for image generation.
- Updated `AIImageCustomizerBlock` to include an aspect ratio field in the input schema.

This change improves the flexibility of the AI image customization process by allowing users to specify desired aspect ratios for generated images.
@Torantulino Torantulino changed the title feat(backend): enhance AI image customization with media file storage fix(backend): Implement passed uploaded media support for AI image customizer block Nov 25, 2025
@Torantulino
Copy link
Member Author

Tested aspect ratio addition:

image

…lock

Replace sequential image processing loop with parallel asyncio.gather to process multiple images concurrently, improving performance when handling multiple input images.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@Torantulino
Copy link
Member Author

image Tested on dev cloud - working!

@Torantulino Torantulino requested a review from majdyz November 26, 2025 13:32
@github-project-automation github-project-automation bot moved this from 🆕 Needs initial review to 👍🏼 Mergeable in AutoGPT development kanban Nov 26, 2025
@Torantulino Torantulino added this pull request to the merge queue Nov 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 👍🏼 Mergeable

Development

Successfully merging this pull request may close these issues.

6 participants