richrobber2 / canvas-zoom

zoom and pan functionality
350 stars 23 forks source link

Upcoming issues in next version of web UI 1.6.0, Gradio 3.39 #88

Closed w-e-w closed 1 year ago

w-e-w commented 1 year ago

in the next version of web UI we are moving to Gradio 3.39, see current dev branch

with this comes a new feature, the inpaint mask is render as transparent

this is from the sketch tool not colore-sketch tool

this main issue is that this extension injects some code into Gradio lib, which causes the transparency to not work

some other things is also displayed weirdly

furthermore the change is injectded itself into Gradio and so the changes persist even after the extension is disabled or removed

daswer123 commented 1 year ago

Yes, I will look into porting all canvas-zoom modifications to the new version of gradio so that there are no problems with the new webui version.

Thanks for letting me know.

daswer123 commented 1 year ago

furthermore the change is injectded itself into Gradio and so the changes persist even after the extension is disabled or removed

There is definitely a problem with this, as there is no procedure for uninstalling the extension to properly restore the gradio library.

https://github.com/richrobber2/canvas-zoom/wiki/Troubleshooting#i-deleted-the-extension-but-some-elements-of-the-extension-remain

daswer123 commented 1 year ago

@w-e-w I have an idea how this could be fixed, do you think this solution would be a good one?

Actually I have an idea, for example, when installing canvas-zoom, I put a file detect_canvas_zoom.py in the scripts folder, which will check whether the extension is installed or not, if the user deleted the extension folder, then this script at the next startup, automatically reinstall gradio and self-delete.

w-e-w commented 1 year ago

well we kind of arrived at the same solution but when I brought the idea up with auto he doesn't seem to keen either that or my initial picture of the idea was not that great

I think it may be better for you to join auto's discord so you can discuss with him directly?

then invite link is on the web UI contribution page in the wiki

I'm not in front of my computer right now

w-e-w commented 1 year ago

is patching the lib absolutely necessary no way around it?

daswer123 commented 1 year ago

is patching the lib absolutely necessary no way around it?

The modified library contains a lot of small changes that cannot be done from the outside.

I moved everything that worked well to the build in extension, because all other functionality in one way or another relies on modification of gradio.

I don't change anything coordinate, in many respects the extension relies on these small functions that ensure correct work, in fact the same gradio but with a small modification.

then invite link is on the web UI contribution page in the wiki

I'm already in your community :) , you can tag me in discord @daswer123.

daswer123 commented 1 year ago

@w-e-w Updated to version 3.39, and also added detection for the presence of an extension, and if it is not present, gradio is reinstalled.

The installation method is so far, old, I need to figure out how to swap the folder.