AbdullahAlfaraj / Auto-Photoshop-StableDiffusion-Plugin

A user-friendly plug-in that makes it easy to generate stable diffusion images inside Photoshop using either Automatic or ComfyUI as a backend.
MIT License
6.68k stars 508 forks source link

Inpainting/outpainting image and mask selection #199

Open Rey-94 opened 1 year ago

Rey-94 commented 1 year ago

Thank you for the greqt work by the way. I'm hoping you can help with a issue i've been having. Once i generate an image with the mask using inpainting : i'm having a really hard time to select another part of the image for inpainting. Like the button in the controlnet tab in which you can click in the button setcontrolnet image, the button to set the image in inpainting/outpainting does not work. It keeps selecting the first area i used for the first inpainting session. I have to restart photoshop every time. Maybe i'm missing some command to set the image after i selected it with the rectangular tool ? Thank you very much !

Rey-94 commented 1 year ago

Screenshot 2023-03-27 181615 i mean those buttons.

AbdullahAlfaraj commented 1 year ago

It quite easy to inpaint on another area, you should click on one of these buttons image to close the active session.
then paint white on the newly created Mask -- Paint White to Mask -- temporary layer, then click generate.

you could also edit the mask without closing the session. 1) Click on the mask preview in the viewer tab, this will reveal the mask layer on the canvas 2) Modify the white mark by adding or removing from it 3) Click on the pen button from the mask preview to update the mask 4) Click generate more button image

Rey-94 commented 1 year ago

Screenshot 2023-04-05 160518 Thank you for your response, This is what happens, once i try to inpaint after the first time, i did what you said but the image selection becomes white

AbdullahAlfaraj commented 1 year ago

The behavior that you have mentioned does not seem to be a typical behavior. It also strikes me as odd that none of the generation mode radio buttons is highlighted, which I believe is indicative of an error resulting from the plugin.

image

Can you check Automatic1111 console for any error messages?

I'll be adding a way soon to view the log messages that the plugin creates. Alternatively, if you're a Programmer, you could view the log output by following the installation instructions for method 3 and then load the plugin using UXP in 'debug' mode. It will open an interactive debugging console like the one you get when you press "F12" in a browser.

Rey-94 commented 1 year ago

Screenshot 2023-04-08 152740 Screenshot 2023-04-08 152633 Screenshot 2023-04-08 152553 Screenshot 2023-04-08 152705 uploaded automatic 1111 cmd window logs

Rey-94 commented 1 year ago

sorry they were not in order, i forgot to check that, this was when trying to inpaint, and what results is the previous image with white backround

AbdullahAlfaraj commented 1 year ago

It seems that initial image doesn't get captured by the plugin, hence why the white image is shown in the preview. This could be related to a js library called JIMP.

One thing you could try is to change the image processing method in the settings tab. Use the "Slow PC" option which only uses photoshop for image processing.

Let me know if this fixes the issue.

image

vegu commented 1 year ago

I was having similar issues - usually it would work first time , then any follow up inpainting would result in white background - looking closer it'd set the image i was trying to inpaint as the mask, and the image itself as white.

Changing to Slow PC seems to have fixed this for me.