deforum-stable-diffusion icon indicating copy to clipboard operation
deforum-stable-diffusion copied to clipboard

Newbie help

Open DarkThought666 opened this issue 2 years ago • 3 comments

I watched a tutorial on how to use stable diffusion on colab... I did what the tutorial asked and I produced a video but now I can't produce one... I'm getting this error. I'm fairly new to working with code, all the help will be appreciated.

Using 0 input frames from /content/drive/MyDrive/AI/StableDiffusion/2023-03/sphongo/inputframes...

KeyError Traceback (most recent call last) in 153 # dispatch to appropriate renderer 154 if anim_args.animation_mode == '2D' or anim_args.animation_mode == '3D': --> 155 render_animation(args, anim_args, animation_prompts, root) 156 elif anim_args.animation_mode == 'Video Input': 157 render_input_video(args, anim_args, animation_prompts, root)

5 frames /usr/local/lib/python3.8/dist-packages/pandas/core/indexes/range.py in get_loc(self, key, method, tolerance) 386 except ValueError as err: 387 raise KeyError(key) from err --> 388 raise KeyError(key) 389 return super().get_loc(key, method=method, tolerance=tolerance) 390

KeyError: None

DarkThought666 avatar Mar 04 '23 14:03 DarkThought666

Did you check the "resume_from_timestring" checkbox? If so, it cant find the sequence from the resume_timestring timestamp. It's kind of a mouthful. Go into GDrive, find your image sequence and pick one. Select the timestamp part of the filename and put that in the resume_timestring input. I'm assuming you're attempting to continue your animation. Should be good to go. Let me know.

johnnypeck avatar Mar 11 '23 04:03 johnnypeck

Hey mate. Thanks for the response. I got it fixed by simply waiting a day. but now I am getting this error. Can you help?


NameError Traceback (most recent call last) in 548 # dispatch to appropriate renderer 549 if anim_args.animation_mode == '2D' or anim_args.animation_mode == '3D': --> 550 render_animation(args, anim_args) 551 elif anim_args.animation_mode == 'Video Input': 552 render_input_video(args, anim_args)

in render_animation(args, anim_args) 199 predict_depths = (anim_args.animation_mode == '3D' and anim_args.use_depth_warping) or anim_args.save_depth_maps 200 if predict_depths: --> 201 depth_model = DepthModel(device) 202 depth_model.load_midas(models_path) 203 if anim_args.midas_weight < 1.0:

NameError: name 'device' is not defined

DarkThought666 avatar Mar 13 '23 23:03 DarkThought666

On the second day did you load a new copy of the notebook in Colab from the Github link? That defaults to the resume checkbox bing false and the notebook functioning correctly.

The device error you are getting means the PyTorch doesn't know where, which device being GPU/CPU/TPU, to run the code. This is most often due to not running all the cells. Make sure all cells run successfully, in the correct order, and report back.

johnnypeck avatar Mar 14 '23 07:03 johnnypeck