huchenlei / stable-diffusion-ps-pea

Use Stable Diffusion in Photopea!
GNU General Public License v3.0
74 stars 3 forks source link

[Minor] Fix boundary issue in #1 #10

Closed huchenlei closed 1 year ago

huchenlei commented 1 year ago

This PR fixes the boundary issue #1 by keep the selection active and crop out the reference area when final image is picked.

In order to implement this fix, the workflow of using SelectRefArea is reworked. Now clicking SelectRefArea will assume the first selection is the reference area, and selection selection is the inpaint area, which matches more to the button meaning.

Improved the pasteOnPhotopea logic, which will wait to fire another invoke when there is one active.

camoody1 commented 1 year ago

Will you update your documentation to fully explain how the Select Ref Area button works? It's not entirely clear to me what that button does.

Also, I'm very confused on what the "Preview Payload" button does.

Thank you for your great work on this.

huchenlei commented 1 year ago

Will you update your documentation to fully explain how the Select Ref Area button works? It's not entirely clear to me what that button does.

Also, I'm very confused on what the "Preview Payload" button does.

Thank you for your great work on this.

https://github.com/huchenlei/stable-diffusion-ps-pea#features section discussed the concept of reference area. It is essentially the range that A1111 will see.

By default if you don't specify reference range manually, the value in Reference Range slider will be used to determine the reference range, which expands the selection by a fixed amount on all sides.

Clicking the PreviewPayload button will display the captured image, and mask, along with other parameters calculated before sending them to A1111. This can be very useful when the result is unexpected and you want to debug your payload.

Hover your mouse on those buttons will display a info text above the button group. Do you have any suggestions on the info text to make them more meaningful? @camoody1