Sygil-Dev / stable-diffusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crop tool in img2img not working properly on larger images

hip-hopanonymous opened this issue · comments

Running this locally, everything is working great except the cropping function in img2img on some photos I took with my phone.

I can crop and properly run prompts on the demo image, and I can load and run my own images without cropping. Once I upload an image and click the pencil edit icon to crop, I can properly move the crop boundary lines, but once I finish cropping and enter my prompt and hit the 'Generate' button, the results field displays "loading" as expected, but in the terminal I can see the model is not running. After this, if I upload another image I cannot run the model even without cropping.
If I load an image and click the pencil button to edit but do not move the image boundaries, I can still run the model. But once I move a boundary, it will not run.

Refreshing the tab resets everything and I can run img2img again, but once I try to crop I again get locked out from running anything.

After further testing, the tools was working with some images downloaded from the web. I reduced the size of my photo which was having issues to half (from 3072x4080, 2.93 MB to 1536x2040, 1.64 MB) and the tool works. So it seems it may be something related to the size of the image.

Oddly enough the mask tool seems to work fine, it's just the crop tool (both basic and advanced editor) that have this problem.

commented

Use photoshop, it is not designed to be a replacement for photoshop. You will get better results doing the cropping yourself.

Honestly it's getting a bit ridiculous the amount of complaints about this. The editor is literally as good as it can be given the technical limitations of gradio, people are expecting too much from a convenience feature.

on some photos I took with my phone.

I don't know what you're expecting to accomplish by using images you took with your phone with img2img either, you do realise it's not a magic feature that does anything and everything, right?

Guess I should have filed this in discussions and not issues then, I didn't realize it was a gradio limitation.
It's an easy enough fix to just shrink images before loading, now that I know what the problem was. I didn't mean this as a complaint, just something that I didn't see documented or discussed anywhere and took some time to figure out why it wasn't working as expected.

I don't know what you're expecting to accomplish by using images you took with your phone with img2img either, you do realise it's not a magic feature that does anything and everything, right?

The photos were of some paintings I wanted to run through img2img. Fully realize it's not a magic feature that does everything, and I ended up getting some great results from it.

Thanks for your work on the repo, it's a great one to use!

commented

I mean, update, it's been changed a bit now, maybe you'll have better results

image