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

Fix Sliders unable to take typed input #2407

Merged
merged 11 commits into from
Jan 26, 2023
Merged

Fix Sliders unable to take typed input #2407

merged 11 commits into from
Jan 26, 2023

Conversation

blessedcoolant
Copy link
Collaborator

So far the slider component was unable to take typed input due to a bunch of issues that were a pain to solve. This PR fixes it.

Things to test:

  • Moving the slider also updates the value in the input text box.
  • Input text box next to slider can be changed in two ways: If you type a manual value, the slider will be updated when you lose focus from the input box. If you use the stepper icons to update the values, the slider should update immediately.
  • Make sure the reset buttons next to the slider are updating correctly and make sure this updates both the slider and the input box values.
  • Brush Size slider -> make sure the hotkeys are updating the input box too.

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By and large looks great, but I found a couple of anomaliels:

  1. In the Unified Canvas, can't type in the text fields for the bounding box width and height.
  2. Similar problem for "Scaled W" and "Scaled H" in "Infill and Scaling"
  3. There's no textbox next to the slider for "Inpaint Replace". Also the reset button sets this to 1, rather than the value of 0.1 which is what you get when you first reset the web UI.

@blessedcoolant
Copy link
Collaborator Author

  1. In the Unified Canvas, can't type in the text fields for the bounding box width and height.
  2. Similar problem for "Scaled W" and "Scaled H" in "Infill and Scaling"

These two are intentional. Because it is crucial that the width and height are in multiples of 64, having the user enter arbitrary numbers means we have to constantly calculate the closest resolutions. This can be relatively painful so I disabled manual entry for width and height and let the stepper handle it.

  1. There's no textbox next to the slider for "Inpaint Replace". Also the reset button sets this to 1, rather than the value of 0.1 which is what you get when you first reset the web UI.

Inpaint replace never had a text box coz of design issues. But those are gone now. I added it and fixed up the default value.

@blessedcoolant
Copy link
Collaborator Author

@lstein Please review this when you get a chance. Thanks. Would like to merge it coz it has a multiple PR build on it.

@hipsterusername
Copy link
Member

I can put this through the ringer and test when I get home today. Sorry for delays - Been a bit busy! 🙃

@keturn - Did we end up removing inpaint replace in diffusers? Should that input just go away, and have the frontend support 1 for img2img strength?

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blessedcoolant blessedcoolant enabled auto-merge (rebase) January 26, 2023 21:31
auto-merge was automatically disabled January 26, 2023 21:55

Rebase failed

@lstein lstein merged commit f36114e into invoke-ai:main Jan 26, 2023
@blessedcoolant blessedcoolant deleted the slider-fix branch January 26, 2023 22:16
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.

3 participants