Open Mozoloa opened 1 year ago
Just rename the script folder from "DepthMap" to "stable-diffusion-webui-depthmap-script". This is in "stable-diffusion-webui\extensions\"
This worked ! That's odd that the folder was renamed that way and it broke things
Of the 36 extensions I have installed, only this one and sd_smartprocess
seem to be sensitive to the name of their directory.
In this case, I suspect it is because it is hard-coded here: https://github.com/thygate/stable-diffusion-webui-depthmap-script/blob/main/scripts/depthmap.py#L37
Of the 36 extensions I have installed, only this one and
sd_smartprocess
seem to be sensitive to the name of their directory.In this case, I suspect it is because it is hard-coded here: https://github.com/thygate/stable-diffusion-webui-depthmap-script/blob/main/scripts/depthmap.py#L37
And that's exactly one line above the error, good find
Replacing that line with the following appears to work:
import pathlib
path_append = pathlib.Path(__file__).parent.resolve()
sys.path.append(str(path_append))
In case it isn't clear why this happens, the extension adds its own scripts
directory as a path to find modules in (e.g. the midas
one in this instance), but it does so by adding a relative path from the webui's root to the searched paths.
The above changes gets the current script path, takes the parent (i.e. scripts
directory) and then adds that instead, so the extensions directory name is no longer hard-coded into the relative path.
Replacing that line with the following appears to work:
import pathlib path_append = pathlib.Path(__file__).parent.resolve() sys.path.append(str(path_append))
will change in next version
Hello!
I've just installed this extension via URL in an updated perfectly functioning A1111 install and the script won't load.
At launch I get
ModuleNotFoundError: No module named 'midas'
More info:
I've tried deleting venv, and it's still doing it