richrobber2 / canvas-zoom

zoom and pan functionality
350 stars 23 forks source link

Canvas-zoom error at startup of SDNext #100

Closed afbagwell closed 5 months ago

afbagwell commented 7 months ago

SDNext is throwing an error at startup when canvas-zoom is installed. It didn't do this before, but I'm not sure what changed recently to cause this.

16:34:37-189541 ERROR    Module load: D:\AiApps\StableDiffusion\sdnext15\scripts\detect_extension.py: NameError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ D:\AiApps\StableDiffusion\sdnext15\modules\script_loading.py:25 in load_module                                       │
│                                                                                                                      │
│   24 │   │   │   with contextlib.redirect_stdout(io.StringIO()) as stdout:                                           │
│ ❱ 25 │   │   │   │   module_spec.loader.exec_module(module)                                                          │
│   26 │   │   │   setup_logging() # reset since scripts can hijaack logging                                           │
│ in exec_module:883                                                                                                   │
│ in _call_with_frames_removed:241                                                                                     │
│                                                                                                                      │
│ D:\AiApps\StableDiffusion\sdnext15\scripts\detect_extension.py:41 in <module>                                        │
│                                                                                                                      │
│   40 # Check if the folder exists                                                                                    │
│ ❱ 41 if not os.path.exists(canvasZoomPath) and gradio_version is not None:                                           │
│   42 │   # If the folder does not exist and we found 'gradio' version, uninstall 'gradio' and                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
NameError: name 'gradio_version' is not defined
gohan2091 commented 7 months ago

I am getting the same error. Any ideas?

richrobber2 commented 7 months ago

I am currently investigating this error. However, for the time being, you should be able to resolve the issue by simply deleting the detect_extension.py file.

In SD Next, it appears that the detect_extension.py file is being duplicated into the scripts folder. Therefore, you should also delete the version in that location.

I'm not entirely sure why this duplication is causing crashes, but it seems to be an issue specific to SD Next. Although I don't use SD Next personally, I am looking into this matter for the benefit of the community. From what I've seen so far, SD Next generally seems to be an improvement.

Root = The location where your SD Next is installed

Please delete the following files from these locations:

Effects: Deleting these files will remove version control, but this shouldn't be a significant issue unless you change the Gradio version to one that introduces incompatible changes. However, there don't seem to be many changes that would affect this significantly, so it should not cause any problems.

cc: @afbagwell, @gohan2091

gohan2091 commented 7 months ago

I can confirm the error has gone away since deleting both detect_extension.py files. Thanks for this temporary workaround!

afbagwell commented 7 months ago

Thanks for looking into this. Confirming the temp solution is also working for me.

daswer123 commented 7 months ago

Hi everyone, I apologize for being out of touch for so long. I fixed the error, but not 100% yet, I'm still looking into how to synchronize it on sdnext and auto1111.

richrobber2 commented 7 months ago

i will leave it to you then. 👍

richrobber2 commented 5 months ago

im going to assume this is fixed since there was no further activity here

richrobber2 commented 5 months ago

open the issue again if im incorrect