-
Notifications
You must be signed in to change notification settings - Fork 2.7k
UI support for gemini 2.5 flash image #8489
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
Merged
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
… does not support ref images
- Disable LoRAs instead of deleting them when base model changes - Update toast message to indicate that we may have _updated_ a model (prev just sayed cleared or disabled) - Do not change ref image models if the new base model doesn't support them. For example, changing from SDXL to Imagen does not update the ref image model or alert the user, because Imagen does not support ref images. Switching from Imagen to FLUX does update the ref image model and alert the user. Just a bit less noisy.
These models only support aspect ratio inputs; not pixel dimensions
…base models; use it in dimensions component
Gemini 2.5 Flash makes no guarantees about output image sizes. Our existing logic always rendered staged images on Canvas at the bbox dims - not the image's physical dimensions. When Gemini returns an image that doesn't match the bbox, it would get squished. To rectify this, the canvas staging area renderer is updated to render its images using their physical dimensions, as opposed to their configured dimensions (i.e. bbox). A flag on CanvasObjectImage enables this rendering behaviour. Then, when saving the image as a layer from staging area, we use the physical dimensions. When the bbox and physical dimensions do not match, the bbox is not touched, so it won't exactly encompass the staged image. No point in resizing the bbox if the dimensions don't match - the next image could be a different size, and the sizes might not be valid (it's an external resource, after all).
psychedelicious
approved these changes
Aug 27, 2025
hipsterusername
approved these changes
Aug 27, 2025
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend
PRs that change backend files
frontend
PRs that change frontend files
invocations
PRs that change invocations
python
PRs that change python files
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.
Summary
UI support for gemini 2.5 flash image as commercial API model
Related Issues / Discussions
QA Instructions
Merge Plan
Checklist
What's New
copy (if doing a release after this PR)