Step 4 in my Deforum Stable Diffusion Notebook keeps giving an error of FileNotFound

2.1k Views Asked by At

I admit that I'm new to a lot of this. It's been many years since I worked with anything this in-depth and I hope I'm in the right place to post this. I apologize if I'm not doing this correctly. Please let me know if I should be doing this differently.

I've been using Stable Diffusion to create animation for a couple of months and it suddenly stopped working for me yesterday. Suddenly, I'm getting an error and can't get beyond Step 4 on my Defor4um Notebook. It's the Python Definition. I'll copy what I'm getting in below. Thank you in advance for any help on this problem. I'd really like to start playing with it all again soon.

Happy Holidaze to one and all!

FileNotFoundError                         Traceback (most recent call last)

<ipython-input-4-191981527364> in <module>
     38 import py3d_tools as p3d
     39 
---> 40 from helpers import DepthModel, sampler_fn
     41 from k_diffusion.external import CompVisDenoiser
     42 from ldm.util import instantiate_from_config

4 frames

/content/MiDaS/midas/backbones/next_vit.py in <module>
      6 from .utils import activations, forward_default, get_activation
      7 
----> 8 file = open("./externals/Next_ViT/classification/nextvit.py", "r")
      9 source_code = file.read().replace(" utils", " externals.Next_ViT.classification.utils")
     10 exec(source_code)

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

I've tried restarting my runtime, restarting my computer, and getting a fresh copy of the notebook.I've even redownloaded that huge model. Nothing has asked for another key code or permissions again. I'm not sure what to do next. Nothing has changed from when I was using it last week.

I've already accepted the huggingface license and have had no trouble getting this to run for a couple of months. It just started doing this all of a sudden.

I don't know how to do custom modifications yet to this area, so the other posts are not helping me.

3

There are 3 best solutions below

0
On

v3.1 seems to contain a shell script for cloning the missing Next_ViT.

Also the URL to Midas GIT was wrong in the 0.5 notebook.

So, the Setup environment should have these lines

['git', 'clone', 'https://github.com/isl-org/MiDaS.git'],
['git', 'clone', 'https://github.com/bytedance/Next-ViT.git', 'externals/Next_ViT'],
0
On

There is an issue with the version of Midas me thinks. Change the branch for midas to v3. It's pulling in 3.1 for you most likely. Try changing the midas import to

['git', 'clone', '--branch', 'v3', 'https://github.com/islorg/MiDaS.git'],
1
On

I think I figured this one out on my own. I believe that the problem is that the notebook I was using no longer works since the model has been updated to work with the new version of Stable Diffusion. I am trying to get the new Deforum Notebook to work now. Thank you!