thygate / stable-diffusion-webui-depthmap-script

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

Error loading script: depthmap.py #215

Open WorldofDepth opened 1 year ago

WorldofDepth commented 1 year ago

Hi, I'm running TheLastBen's Google Colab notebook for Auto1111, and after installing the extension via the interface and trying to restart, I get this error:

Error loading script: depthmap.py
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", 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 58, in <module>
    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 <module>
    from vispy import scene, io
  File "/usr/local/lib/python3.10/dist-packages/vispy/scene/__init__.py", line 33, in <module>
    from .visuals import *  # noqa
  File "/usr/local/lib/python3.10/dist-packages/vispy/scene/visuals.py", line 18, in <module>
    from .. import visuals
  File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/__init__.py", line 14, in <module>
    from .axis import AxisVisual  # noqa
  File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/axis.py", line 13, in <module>
    from .text import TextVisual
  File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/text/__init__.py", line 7, in <module>
    from .text import TextVisual  # noqa
  File "/usr/local/lib/python3.10/dist-packages/vispy/visuals/text/text.py", line 18, in <module>
    from ._sdf_cpu import _calc_distance_field
ModuleNotFoundError: No module named 'vispy.visuals.text._sdf_cpu'

The notebook was running Python 3.10.11. Any idea how to fix this? Thank you.

MonarchOfDarkness commented 1 year ago

It seems that you are missing a module named vispy.visuals.text._sdf_cpu that is required for rendering text using the CPU method. This module is a Cython extension that needs to be compiled before use. You can try to install vispy from the source here: https://vispy.org/installation.html#installing-from-source. Alternatively, you can try to use the GPU method for text rendering by changing the method argument of TextVisual to 'gpu'.

Jacksmind commented 1 year ago

Did the above suggestion resolve the issue? I have to reload the whole of SD every time on google colab, then reload the extension and restart. Its a pain, But it works!