小张的学习笔记

Stable Diffusion使用deforum时报错'DepthModel' object has no attribute 'should_delete'

    情况:当你安装了deforum时,使用了别人的配置文件,结果发现怎么也生成不了图片时,控制台报错如下:

*START OF TRACEBACK*
Traceback (most recent call last):
  File "C:\Users\zxf\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\run_deforum.py", line 78, in run_deforum
    render_animation(args, anim_args, video_args, parseq_args, loop_args, controlnet_args, root)
  File "C:\Users\zxf\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\render.py", line 109, in render_animation
    depth_model = DepthModel(root.models_path, device, root.half_precision, keep_in_vram=keep_in_vram, depth_algorithm=anim_args.depth_algorithm, Width=args.W, Height=args.H,
  File "C:\Users\zxf\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 26, in __new__
    model_deleted = cls._instance and cls._instance.should_delete
AttributeError: 'DepthModel' object has no attribute 'should_delete'
*END OF TRACEBACK*

User friendly error message:
Error: 'DepthModel' object has no attribute 'should_delete'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \.

    将关键帧Keyframes中的动画模式从3D修改成2D就可以解决这个问题了。

 

    或者在关键帧Keyframes => 3D => Depth Warping & FOV  取消掉Use depth warping 前面的√,也可以。