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.
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Description
Some smaller fixes and enhancements (see notes) and two bigger changes.
Optimal Sizing by model
The app now respects the base model chosen and will automatically resize the w/h when it is changed.
Because canvas and linear have their own slices of state, it becomes rather tedious to pass around a "shouldAutoChangeWidthHeight" boolean around. The logic to handle aspect ratio also gets hairier. This feature has been removed. This may be an unpopular change until the new model manager is released and users can set optimal size on a per-model basis. Maybe I can figure out an alternative solution before then.
The automatic optimal sizing has a configurable tolerance, defined in
invokeai/frontend/web/src/features/parameters/util/optimalDimension.ts
. Currently the min is 80% of the optimal size and max is 120% the optimal size. If the selected dimensions are outside these bounds, then the dimensions will be reset to the optimal size.If it's too strict, these tolerances can be changed. Note that the math all operates on the area (w * h).
Hotkeys Modal Redesign
We can do something similar to this for the add node menu and main settings.
Screen.Recording.2024-01-03.at.9.19.34.pm.mov
Related Tickets & Documents
Some discord convos.
QA Instructions, Screenshots, Recordings
Test out aspect ratio related stuff. Try the hotkeys modal.
Merge Plan
This PR can be merged when approved.
Added/updated tests?
[optional] Are there any post deployment tasks we need to perform?
Another RC.