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

NameError: Name 'device' is not defined

Open Zoranvedek opened this issue 3 years ago • 2 comments

I'm at a road block and have no idea as to how to move forward:

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

....any help is appreciated.

Zoranvedek avatar Dec 01 '22 19:12 Zoranvedek

did you fix this and how? thanks

DarkThought666 avatar Mar 13 '23 18:03 DarkThought666

This was running on Google Colab, and I simply deleted the entire AI folder and had it rebuild it, I may have had to manually unzip one of the models afterward--it sometimes hangs on that step.

Zoranvedek avatar Mar 14 '23 02:03 Zoranvedek