sddebz / stable-diffusion-krita-plugin

GNU Affero General Public License v3.0
423 stars 34 forks source link

Only working when making multiple images #7

Closed prog0111 closed 2 years ago

prog0111 commented 2 years ago

I was using the conda version before, but updated to the latest with krita.bat. If press the hotkey or click "Apply txt2img" when batch count and batch size are both set to 1, I'll see the image process in the command window, but Krita never updates. I do see new layers appearing with what I'd expect when generating more than one image at a time though.

liangwei191 commented 2 years ago

same bug here,can not get any output if the batch count =1

prog0111 commented 2 years ago

I've managed to get it working by editing processing.py in the modules folder. I changed line 205: From: if not p.do_not_save_grid and not unwanted_grid_because_of_img_count: To: if not p.do_not_save_grid:

This is an ugly hack, but that's as far as I could go debugging this myself. I'm able to generate single images in Krita now. I'm hoping it helps find the issue. Oh, I also think line 166 should be "if p.n_iter >= 1:" because otherwise the shared.state.job value does not get updated properly.

sddebz commented 2 years ago

Fixed in repo. My bad, only tested with batch_size = 2.

Disabled saving images and grid by default. Generated images are still saved by krita_server.py and you can look at them if you uncheck "Automatically delete temporary image files" option in config tab.

prog0111 commented 2 years ago

Updated to the latest and can confirm it's now working for me normally, thanks!