richrobber2 / canvas-zoom

zoom and pan functionality
351 stars 23 forks source link

Can't find Canvas Zoom Settings in Automatic1111 Anymore, since the last update #70

Closed jem91994 closed 1 year ago

jem91994 commented 1 year ago

This might just be a me being dumb, but after the last update which changed zoom to Alt+scroll from Shift+scroll, I went to settings to see if I could change back that hotkey but Canvas Zoom is no where to be seen in my settings list. It is definitely still working and installed though since it still works in Inpainting its just the setting tab for this extension appears to be missing? Just me or actual bug?

daswer123 commented 1 year ago

In the last update the context menu was removed and all settings were moved to the settings tab

Try restarting webui and the settings tab will have canvas zoom settings

image

jem91994 commented 1 year ago

After looking into it a bit more, it looks like it doesn't like the call for ".info" from the new config.py file.

"canvas_hotkey_zoom": shared.OptionInfo("Shift", "Zoom canvas", gr.Radio, {"choices": ["Shift","Ctrl", "Alt"]}).info("If you choose 'Shift' you cannot scroll horizontally, 'Alt' can cause a little trouble in firefox")

The error in my terminal was: AttributeError: 'OptionInfo' object has no attribute 'info'

Error loading script: config.py Traceback (most recent call last): File "C:\sd.webui\webui\modules\scripts.py", line 257, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\sd.webui\webui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\sd.webui\webui\extensions\canvas-zoom\scripts\config.py", line 5, in "canvas_hotkey_zoom": shared.OptionInfo("Shift", "Zoom canvas", gr.Radio, {"choices": ["Shift","Ctrl", "Alt"]}).info("If you choose 'Shift' you cannot scroll horizontally, 'Alt' can cause a little trouble in firefox"), AttributeError: 'OptionInfo' object has no attribute 'info'

daswer123 commented 1 year ago

Hmm, can you show the commit hash in the console?

image

jem91994 commented 1 year ago

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: v1.2.1 Commit hash: 89f9faa63388756314e8a1d96cf86bf5e0663045 Installing requirements

I assume this means it a me thing lol. Sorry about wasting your time, really appreciate your extension!

I fixed it locally for me by removing the .info explanation of the settings options, it now loads the file and works, Idk if others running an older version of python like me or something would also run into this issue, or if its something else that makes my build have issues with that attribute. I'll leave it up to you to close the issue out if you want. Thanks though!

daswer123 commented 1 year ago

Bro no problem, if it wasn't for you I wouldn't have known there was a problem. I found the problem, the thing is that this property appeared only with version 1.3 and I will try to find an alternative that would make the extension work on older versions.

daswer123 commented 1 year ago

Released a hotfix, later I will add additional information that I temporarily removed for older versions