thygate / stable-diffusion-webui-depthmap-script

High Resolution Depth Maps for Stable Diffusion WebUI
MIT License
1.72k stars 159 forks source link

Extension not showing #263

Closed Jacksmind closed 1 year ago

Jacksmind commented 1 year ago

Hi Ive tried a few time to install the extension on 2 separate google colab accounts, one a completely fresh install of Stable diffusion. The extension process works(and shows up in the extensions list) but on all occasions neither the 'Depth' tab shows up (after several restarts of the UI) or does it show in the scripts on img2img etc. Ive tried everything before resorting to messaging!

Screen Shot 2023-06-26 at 17 20 26 Screen Shot 2023-06-26 at 17 19 45

ChromaBenDada commented 1 year ago

I've been fighting this one for about a week but know too little about these processes to solve it. I wish I could be of help since I REALLY need to solve this too. Assuming you're using Colab, do you see any "module missing" errors when you run the code? When I get to the code to run Stable Diffusion, it usually starts telling me it can't locate "trimesh" Then after pip installing "trimesh" I get the error "Error loading script: depthmap.py" and ModuleNotFoundError: No module named 'vispy.visuals.text._sdf_cpu'

pip installing vispy doesn't solve it, and that's where I usually give up. There was a thread here were someone claimed to fix some issues by running a script. I tried adding this to the notebook and for some reason, between various errors, and trying re-installing trimesh and vispy with pip install code back and forth, this worked for me ONCE and I got the depth tabs and UI for about an hour... and then disconnected and I went home for the day. ...and then of course it never worked again when I tried restarting the notebook and running all the code. Essentially back to square one.

I tried pasting the code here, but the indents all disappeared. You might fishing around in the "Issues" threads. In my case, it was returning errors and I had to ask Chat GPT what the problem was, and was told that it was missing essential indents. You may need to check and do the same.

ChromaBenDada commented 1 year ago

After re-installing trimesh, this is my result when running the stable diffusion code. Note errors with "depthmap.py" and "vispy...":

2023-06-27 05:27:53,647 - ControlNet - INFO - ControlNet v1.1.227 ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads 2023-06-27 05:27:53,890 - ControlNet - INFO - ControlNet v1.1.227 Error loading script: depthmap.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/depthmap.py", line 59, in from inpaint.mesh import write_mesh, read_mesh, output_3d_photo File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/inpaint/mesh.py", line 12, in from vispy import scene, io File "/usr/local/lib/python3.10/dist-packages/vispy/scene/init.py", line 33, in from .visuals import * # noqa File "/usr/local/lib/python3.10/dist-packages/vispy/scene/visuals.py", line 18, in from .. import visuals File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/init.py", line 14, in from .axis import AxisVisual # noqa File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/axis.py", line 13, in from .text import TextVisual File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/text/init.py", line 7, in from .text import TextVisual # noqa File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/text/text.py", line 18, in from ._sdf_cpu import _calc_distance_field ModuleNotFoundError: No module named 'vispy.visuals.text._sdf_cpu'

Jacksmind commented 1 year ago

I've been fighting this one for about a week but know too little about these processes to solve it. I wish I could be of help since I REALLY need to solve this too. Assuming you're using Colab, do you see any "module missing" errors when you run the code? When I get to the code to run Stable Diffusion, it usually starts telling me it can't locate "trimesh" Then after pip installing "trimesh" I get the error "Error loading script: depthmap.py" and ModuleNotFoundError: No module named 'vispy.visuals.text._sdf_cpu'

pip installing vispy doesn't solve it, and that's where I usually give up. There was a thread here were someone claimed to fix some issues by running a script. I tried adding this to the notebook and for some reason, between various errors, and trying re-installing trimesh and vispy with pip install code back and forth, this worked for me ONCE and I got the depth tabs and UI for about an hour... and then disconnected and I went home for the day. ...and then of course it never worked again when I tried restarting the notebook and running all the code. Essentially back to square one.

I tried pasting the code here, but the indents all disappeared. You might fishing around in the "Issues" threads. In my case, it was returning errors and I had to ask Chat GPT what the problem was, and was told that it was missing essential indents. You may need to check and do the same.

Hi. Yes, Im using Colab. Ive not had any errors, just not had any success either. Im hoping it will be resolved at some point, but the more I cant use it the more I need it! (its actually essential for my work) Thanks for the code :-)

ChromaBenDada commented 1 year ago

Oof. Sorry to hear. If you ever get it going, please update this thread. I could use a lifeline. (no pressure :p)

ChromaBenDada commented 1 year ago

Actually sorry to ask, are you using a notebook you made from scratch or are you using a notebook from someone else? I was trying to use a notebook by "TheLastBen" as a starter.

Pwhite95 commented 1 year ago

I'm not using collab but I am having the same problem as well. I have it installed but the tab is not showing up in my UI nor is it showing up in my scripts drop-down. Any help would be great :)

semjon00 commented 1 year ago

@Jacksmind @ChromaBenDada @Pwhite95 There is a fresh-from-the-oven update available. Please update and try again, does it fix the issue?

I just tested fast_stable_diffusion_automatic1111 Colab notebook and it works on my machine it loads on the remote machine. There is an issue that prevents it from displaying images that requires some more digging - but at least you can get the images from the "output" folder in the Google Drive.

ChromaBenDada commented 1 year ago

@semjon00 Thanks for responding. No the problem persists. When running the cell to "Start SD" it first tells me that "trimesh" is missing. After pip installing, the next time around it tells me that the "vispy...cpu" item is missing as described above. I tried re-installing vispy from source, but no luck. I could update the extension in the UI, but the Depth tab still doesn't appear reliably. "Error loading depthmap.py" and " ImportError: cannot import name 'config' from 'vispy' (unknown location)" are a thing now.

Jacksmind commented 1 year ago

After re-installing trimesh, this is my result when running the stable diffusion code. Note errors with "depthmap.py" and "vispy...":

2023-06-27 05:27:53,647 - ControlNet - INFO - ControlNet v1.1.227 ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads 2023-06-27 05:27:53,890 - ControlNet - INFO - ControlNet v1.1.227 Error loading script: depthmap.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/depthmap.py", line 59, in from inpaint.mesh import write_mesh, read_mesh, output_3d_photo File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/inpaint/mesh.py", line 12, in from vispy import scene, io File "/usr/local/lib/python3.10/dist-packages/vispy/scene/init.py", line 33, in from .visuals import * # noqa File "/usr/local/lib/python3.10/dist-packages/vispy/scene/visuals.py", line 18, in from .. import visuals File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/init.py", line 14, in from .axis import AxisVisual # noqa File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/axis.py", line 13, in from .text import TextVisual File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/text/init.py", line 7, in from .text import TextVisual # noqa File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/text/text.py", line 18, in from ._sdf_cpu import _calc_distance_field ModuleNotFoundError: No module named 'vispy.visuals.text._sdf_cpu'

Yes, I have the same. Think its a lame duck onColab for now :-(

ChromaBenDada commented 1 year ago

@Jacksmind I realized today I can get everything running for one session if I: 1) delete the SD folder from Google Drive 2) run all the cells in order again (currently using model 1.5 and canny for controlnet) 3) re-install the High Def Extension 4) Quit (trying to restart fails for me) 5) Re-run the SD launcher 6) entering the web UI gives access to the Depthmap tab. There are some errors that show up related to "ALSA lib" but they don't seem to be critical.

I was able to knock out a few models before I crashed. Attempting to relaunch everything again from this install doesn't work and starts giving trimesh and vispy errors again. So starting over from 1 seems to more or less get it rolling again. Unfortunately I ran out of Colab units in the process of troubleshooting, so I can't say this will work every time with confidence, but doing this has worked a couple times. Give it a try?

Jacksmind commented 1 year ago

o

@Jacksmind I realized today I can get everything running for one session if I:

  1. delete the SD folder from Google Drive
  2. run all the cells in order again (currently using model 1.5 and canny for controlnet)
  3. re-install the High Def Extension
  4. Quit (trying to restart fails for me)
  5. Re-run the SD launcher
  6. entering the web UI gives access to the Depthmap tab. There are some errors that show up related to "ALSA lib" but they don't seem to be critical.

I was able to knock out a few models before I crashed. Attempting to relaunch everything again from this install doesn't work and starts giving trimesh and vispy errors again. So starting over from 1 seems to more or less get it rolling again. Unfortunately I ran out of Colab units in the process of troubleshooting, so I can't say this will work every time with confidence, but doing this has worked a couple times. Give it a try?

great. ill try that, thanks

semjon00 commented 1 year ago

I followed these instructions and it worked:

  1. Delete the sd folder
  2. Google fast_stable_diffusion_AUTOMATIC1111 and open the first link
  3. Click "Connect Google Drive", "Install/Update AUTOMATIC1111 repo", "Requirements", "Start Stable-Diffusion". Please do not click "Model Download/Load" as the extension can be used without SD model(s). Please do not install ControlNet (unless you need it).
  4. Open the interface, install the Depth Maps extension, then click "Apply and quit" After all this is done, click "Start Stable-Diffusion". Here I see "Depth" tab, it does not disappear if I restart the WebUI.

image

Free Google Colab is not a good/reliable way to use WebUI. In my experience, it crashes too often. Maybe try alternative ways to run it?

semjon00 commented 1 year ago

If you have further issues, please provide the full console output - otherwise it is harder to understand why it does not work. I am aware that there is "generated pictures do not show in the UI" issue and I can confirm that this part absolutely does not work yet ;p

Jacksmind commented 1 year ago

I followed your instructions to the letter and can confirm that it works well. I got a few errors during the process of generating 3D images (stopped if I turned off 'Show depth map) but all in all, excellent. Thank you semjon00