Skip to content
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

ui: redesign followups 4 #5387

Merged
merged 12 commits into from
Jan 3, 2024
Merged

ui: redesign followups 4 #5387

merged 12 commits into from
Jan 3, 2024

Conversation

psychedelicious
Copy link
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because:

Have you updated all relevant documentation?

  • Yes
  • No

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?

  • Yes
  • No : n/a

[optional] Are there any post deployment tasks we need to perform?

Another RC.

- Displays all as list
- Uses chakra `Kbd` component for keys
- Provides search box
Cannot figure out how to allow the bbox to be transformed when aspect ratio is locked from all handles. Only the bottom right handle works as expected.

As a workaround, when the aspect ratio is locked, you can only resize the bbox from the bottom right handle.
Removed logic related to aspect ratio from the components.

When the main bbox changes, if the scale method is auto, the reducers will handle the scaled bbox size appropriately.

Somehow linking up the manual mode to the aspect ratio is tricky, and instead of adding complexity for a rarely-used mode, I'm leaving manual mode as fully manual.
@hipsterusername hipsterusername merged commit 21975d6 into main Jan 3, 2024
7 checks passed
@hipsterusername hipsterusername deleted the feat/ui/redesign-followups-4 branch January 3, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants