Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sev222 opened this issue Dec 28, 2022 · 7 comments

Comments

@sev222
Copy link

sev222 commented Dec 28, 2022

`
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'`

@t8ja
Copy link

t8ja commented Dec 29, 2022

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.

@konqiDAM
Copy link

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
Copy link

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

@G-force78
Copy link

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?

@Banbury
Copy link

Banbury commented Dec 31, 2022

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

@t8ja
Copy link

t8ja commented Jan 1, 2023

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 

@alenknight
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants