depthmap2mask icon indicating copy to clipboard operation
depthmap2mask copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: './externals/Next_ViT/classification/nextvit.py'

Open sev222 opened this issue 3 years ago • 7 comments

` File "D:\stable-diffusion-webui\extensions\depthmap2mask\scripts\depth2image_depthmask.py", line 76, in run sdmg = module_from_file("depthmap_for_depth2img",'extensions/depthmap2mask/scripts/depthmap_for_depth2img.py')

File "D:\stable-diffusion-webui\extensions\depthmap2mask\scripts\depth2image_depthmask.py", line 22, in module_from_file spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "extensions/depthmap2mask/scripts/depthmap_for_depth2img.py", line 11, in from repositories.midas.midas.dpt_depth import DPTDepthModel File "D:\stable-diffusion-webui\repositories\midas\midas\dpt_depth.py", line 5, in from .blocks import ( File "D:\stable-diffusion-webui\repositories\midas\midas\blocks.py", line 21, in from .backbones.next_vit import ( File "D:\stable-diffusion-webui\repositories\midas\midas\backbones\next_vit.py", line 15, in file = open("./externals/Next_ViT/classification/nextvit.py", "r") FileNotFoundError: [Errno 2] No such file or directory: './externals/Next_ViT/classification/nextvit.py'`

sev222 avatar Dec 28 '22 21:12 sev222

You have to run the "install_next_vit.sh" in the midas directory (which just does a "git clone" ), and your problem is actually downstream from mine, but both are solved by manual operations.

t8ja avatar Dec 29 '22 16:12 t8ja

I did that but still had same error, then I changed the file manually to point to correct dir but it gives me another error: imagen

Is this windows realted? May I missing something ?

konqiDAM avatar Dec 30 '22 04:12 konqiDAM

this seems to work https://www.youtube.com/watch?v=tIo0b0YJ2GA

konqiDAM avatar Dec 30 '22 04:12 konqiDAM

You have to run the "install_next_vit.sh" in the midas directory (which just does a "git clone" ), and your problem is actually downstream from mine, but both are solved by manual operations.

Where do you git clone it to?

G-force78 avatar Dec 30 '22 21:12 G-force78

I have rolled back Midas to v3. That works good enough for me.

Banbury avatar Dec 31 '22 19:12 Banbury

stable-diffusion-webui-docker/data/config/auto/startup.sh

cd repositories && git clone "https://github.com/isl-org/MiDaS.git" && 
mv MiDaS midas &&
cd midas && 
./install_next_vit.sh && 
cd midas/backbones &&
sed -i 's#./externals/Next_ViT/classification/nextvit.py#repositories/midas/midas/backbones/vit.py#' next_vit.py 

t8ja avatar Jan 01 '23 13:01 t8ja

You need to be in the webui root folder, then enter

git clone https://github.com/bytedance/Next-ViT.git externals/Next_ViT

alenknight avatar Jan 10 '23 21:01 alenknight