zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
499 stars 43 forks source link

Actual infinity fixes for selection tool #180

Open patrickas opened 1 year ago

patrickas commented 1 year ago

This should make the selection tool work as expected

patrickas commented 1 year ago

I am not happy with the way I made the stamp tool work, but I guess we can revert it when we someone implements the proper way.

Currently, when stamp tool is selected, and an image is selected, then just moving the cursor outside the boundary expands it.

The right way feels like it should be to: 1 - Always show the full preview of the image without ever clipping it even when the boundary is not expanded. 2 - On stamping, expand the canvas here and there to fit the image.

I will try working on that later if no one else has the time to, but initial trials did not seem promising 🤷‍♀️

zero01101 commented 1 year ago

then just moving the cursor outside the boundary expands it

yeah, just selecting an image and simply moving the mouse all over a zoomed-out canvas (which is obviously not the intended use case lol) seems to spike up VRAM usage pretty easily too; probably less of an issue with browsers that aren't 3d-accelerated but that seems less and less likely these days... also, in doing that not-intended use case garbage above, it seems that the stamp tool actually kind of breaks after abusing it like i was doing - the stamp image disappears, fails to apply on click, and then new stamp selections don't visibly appear either :/

ezgif-5-e87680ab1c

seijihariki commented 1 year ago

I think we should only actually expand the canvas when drawing, and not for cursor overlay display...