-
Notifications
You must be signed in to change notification settings - Fork 111
fix(generate_image): updating generate_image tool to support additional models in Amazon Bedrock #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+137
−97
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zastrowm
reviewed
Jun 17, 2025
6 tasks
Fix image generation functionality by adding support for Amazon Nova Canvas model in addition to existing Stable Diffusion models. This enhancement allows users to generate images using both model types with appropriate parameters.
The fix has been implemented and the current update to the branch supports all latest Stable Diffusion models (SD Ultra, SD Core and 3.5) and Nova Canvas. Tests has been updated accordingly. The current implementation defaults to SD Core which is the successor of SDXL that was phased out. @zastrowm could you please review and merge the PR? |
zastrowm
requested changes
Jun 19, 2025
…es parameter (defaulting the tool to generate one image always
…upport stable diffusion models
zastrowm
requested changes
Jun 24, 2025
Co-authored-by: Mackenzie Zastrow <3211021+zastrowm@users.noreply.github.com>
Co-authored-by: Mackenzie Zastrow <3211021+zastrowm@users.noreply.github.com>
zastrowm
approved these changes
Jun 26, 2025
jimbrub
added a commit
to jimbrub/tools
that referenced
this pull request
Jul 15, 2025
author James Brubaker <jimmybrubaker@live.com> 1750079629 -0400 committer James Brubaker <jimmybrubaker@live.com> 1752586952 -0400 * test(memory): add an end-to-end integration test * test: refactor code to be more readable --------- Co-authored-by: Jack Yuan <jackypc@amazon.com> fix(generate_image): updating generate_image tool to support additional models in Amazon Bedrock (strands-agents#89) * switching region to us-east-1 as sdxl model is no longer available in us-west-2 * fix(image-gen): add support for Amazon Nova Canvas Fix image generation functionality by adding support for Amazon Nova Canvas model in addition to existing Stable Diffusion models. This enhancement allows users to generate images using both model types with appropriate parameters. * fix(gen_image): region selection and number of images parmaters * fix: updating toolspec to include region id and remove number of images parameter (defaulting the tool to generate one image always * fix(generate_image): update the tool to initial state where it only support stable diffusion models * Update src/strands_tools/generate_image.py Co-authored-by: Mackenzie Zastrow <3211021+zastrowm@users.noreply.github.com> * fix(generate_image): removing conditional for model specific * Update src/strands_tools/generate_image.py Add end to end test for read, write, edit tools (strands-agents#100) * test(read_write_edit): add end to end tests for these tools --------- Co-authored-by: Jack Yuan <jackypc@amazon.com> test(generate_read_image): add end to end tests for image tools (strands-agents#107) Co-authored-by: Jack Yuan <jackypc@amazon.com> feat: migrate editor tool from TOOL_SPEC to @tool decorator (strands-agents#111) Adding use_computer tool fix: Updating readme with fix for use_browser tool fix: replace colorama with rich's native styling in use_aws tool (strands-agents#118) * fix: replace colorama with rich's native styling in use_aws tool - Replace colorama Fore/Style with rich Table for better UI rendering - Add structured table layout for AWS operation details - Improve visual consistency with other rich-based tools - Remove colorama dependency from use_aws module - Fixes strands-agents#35: use_aws tool rich UI rendering issues * chore: remove colorama dependency from pyproject.toml - No longer needed after replacing colorama with Rich native styling - Fixes Rich panel border rendering issues when mixing ANSI sequences - Part of use-aws Rich UI rendering improvements --------- Co-authored-by: Strands Agent <217235299+strands-agent@users.noreply.github.com> Add stability tool (strands-agents#101) Adds a tool that will create images using the Stability AI Platform + related documentation feat: updating README.md with information about use_computer test(http_request): add integration test for http_request tool (strands-agents#113) * test(http_request): add integration test for http_request tool * test(http_request): use self host server to handle the tests, fix mem0 unit test fail when user has faiss installed --------- Co-authored-by: Jack Yuan <jackypc@amazon.com> fix: Fixing optional dependencies for use_browser tool (strands-agents#119) * fix: Fixing optional dependencies for use_browser tool * fix: Fixing optional dependencies for use_browser tool * fix: Updating readme with fix for use_browser tool fix: fixing dependencies and merging with main branch feat(a2a): native client tool (strands-agents#108) Co-authored-by: jer <jerebill@amazon.com> refactor(a2a): rename dependency target and update docs (strands-agents#125) Co-authored-by: jer <jerebill@amazon.com> adding code to delete screenshots taken by use_computer adding pytesseract dependency as optional
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The model currently used in generate_image tool has a hard-coded region for us-west-2. The model is no longer available in that region. The model is also being phased out of Amazon Bedrock.
This PR will focus on the generate image tool to include the latest supported image generation models and their parameters. The fix has implemented support for all Stable Diffusion and Nova Canvas models.
Related Issues
This will fix issue #75
Documentation PR
This will ensure that PR for multi modal examples is operating as expected- strands-agents/docs#93
Type of Change
Testing
hatch fmt --linter
hatch fmt --formatter
hatch test --all
Checklist
I have read the CONTRIBUTING document
I have added tests that prove my fix is effective or my feature works
I have updated the documentation accordingly
I have added an appropriate example to the documentation to outline the feature
My changes generate no new warnings
Any dependent changes have been merged and published
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.