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 9 #5460

Merged
merged 11 commits into from
Jan 10, 2024
Merged

ui: redesign followups 9 #5460

merged 11 commits into from
Jan 10, 2024

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented Jan 9, 2024

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

Numerous small fixes and a handful of minor canvas optimizations.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

  • Test problems/request this PR is set to close.
  • Open canvas and draw/move bbox around. Use the space and shift hotkeys.

Merge Plan

This PR can be merged when approved.

For some reason `ReturnType<typeof useListImagesQuery>` isn't working correctly, and destructuring `queryResult` it results in `any`, when the hook is used.

I've removed the explicit return typing so that consumers of the hook get correct types.
This was needed when we didn't support SDXL on canvas.
… base model

There's a challenge to accomplish this due to our slice structure - the model is stored in `generationSlice`, but `canvasSlice` also needs to have awareness of it. For example, when the model changes, the canvas slice doesn't know what the previous model was, so it doesn't know whether or not to optimize the size.

This means we need to lift the "should we optimize size" information up. To do this, the `modelChanged` action creator accepts the previous model as an optional second arg.

Now the canvas has access to both the previous model and new model selection, and can decide whether or not it should optimize its size setting in the same way that the generation slice does.

Closes  #5452
It was rounding dimensions when it shouldn't.

Closes #5453
I was troubleshooting a hotkeys issue on canvas and thought I had broken the tool logic in a past change so I redid it moving it to nanostores. In the end, the issue was an upstream but with the hotkeys library, but I like having tool in nanostores so I'm leaving it.

It's ephemeral interaction state anyways, doesn't need to be in redux.
@hipsterusername hipsterusername merged commit 80ec9f4 into main Jan 10, 2024
7 checks passed
@hipsterusername hipsterusername deleted the feat/ui/redesign-followups-9 branch January 10, 2024 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants