sd-webui-deforum
sd-webui-deforum copied to clipboard
[Bug]: Depth Warping ON it gives me an error
Have you read the latest version of the FAQ?
- [X] I have visited the FAQ page right now and my issue is not present there
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui
Are you using the latest version of the Deforum extension?
- [X] I have Deforum updated to the lastest version and I still have the issue.
What happened?
When I'm trying to run generation in 3D mode with Depth Warping ON it gives me an error.
Steps to reproduce the problem
- Start AUTOMATIC1111 (I use portable version by serpotapov)
- Go to Deforum tab and turn on the 3d mode, all other settings are the same as default (Depth Warp is automatically ON in 3d mode as I understand)
- Press 'Generate' once and get: Error: 'argument of type 'NoneType' is not iterable'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli.
- Press generate the second time and get: 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 . Full error message is in your terminal/ cli.
What should have happened/how would you fix it?
I fix it by turning off the Depth Warping but it's definitely not the best way to do it.
Torch version
torch: 2.0.1+cu118
On which platform are you launching the webui with the extension?
Local PC setup (Windows)
Deforum settings
https://gist.github.com/Bogodui/20a501fa1c9857bbb6172853062cdb37
Webui core settings
https://gist.github.com/Bogodui/0daa2fe5b5718df37d55ee3079613b8a
Console logs
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
* branch master -> FETCH_HEAD
Already up to date.
venv "venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Version: ## 1.4.1
Commit hash: f865d3e11647dfd6c7b2cdf90dde24680e58acd8
Installing requirements
current transparent-background 1.2.3
Launching Web UI with arguments: --xformers --autolaunch --theme dark
=================================================================================
You are running xformers 0.0.17.
The program is tested to work with xformers 0.0.20.
To reinstall the desired version, run with commandline flag --reinstall-xformers.
Use --skip-version-check commandline argument to disable this check.
=================================================================================
2023-07-19 18:15:16,952 - ControlNet - INFO - ControlNet v1.1.233
ControlNet preprocessor location: X:\Stable-Diffusion\extensions\sd-webui-controlnet\annotator\downloads
2023-07-19 18:15:17,085 - ControlNet - INFO - ControlNet v1.1.233
Loading weights [9aba26abdf] from X:\Stable-Diffusion\models\Stable-diffusion\deliberate_v2.safetensors
Creating model from config: X:\Stable-Diffusion\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
*Deforum ControlNet support: enabled*
DiffusionWrapper has 859.52 M params.
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 16.1s (import torch: 4.8s, import gradio: 3.4s, import ldm: 1.0s, other imports: 2.8s, setup codeformer: 0.3s, list SD models: 0.2s, load scripts: 2.3s, create ui: 0.9s, gradio launch: 0.4s).
preload_extensions_git_metadata for 11 extensions took 1.45s
Applying attention optimization: xformers... done.
Textual inversion embeddings loaded(0):
Model loaded in 7.1s (load weights from disk: 0.5s, create model: 1.6s, apply weights to model: 2.4s, apply half(): 1.0s, move model to device: 1.3s, calculate empty prompt: 0.2s).
Deforum extension for auto1111 webui, v2.4b
Git commit: 858c4dd6
Saving animation frames to:
X:\Stable-Diffusion\outputs/img2img-images\Deforum_20230719181719
Loading MiDaS model from dpt_large-midas-2f21e586.pt...
*** Error verifying pickled file from X:\Stable-Diffusion\models/Deforum\dpt_large-midas-2f21e586.pt
*** -----> !!!! The file is most likely corrupted !!!! <-----
*** You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.
***
Traceback (most recent call last):
File "X:\Stable-Diffusion\modules\safe.py", line 83, in check_pt
with zipfile.ZipFile(filename) as z:
File "X:\Stable-Diffusion\python\lib\zipfile.py", line 1267, in __init__
self._RealGetContents()
File "X:\Stable-Diffusion\python\lib\zipfile.py", line 1334, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X:\Stable-Diffusion\modules\safe.py", line 137, in load_with_extra
check_pt(filename, extra_handler)
File "X:\Stable-Diffusion\modules\safe.py", line 104, in check_pt
unpickler.load()
_pickle.UnpicklingError: persistent IDs in protocol 0 must be ASCII strings
---
*START OF TRACEBACK*
Traceback (most recent call last):
File "X:\Stable-Diffusion\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 "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\render.py", line 110, 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 "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 32, in __new__
cls._instance._initialize(models_path=args[0], device=args[1], half_precision=not cmd_opts.no_half, keep_in_vram=keep_in_vram, depth_algorithm=depth_algorithm, Width=Width, Height=Height, midas_weight=midas_weight)
File "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 48, in _initialize
self._initialize_model()
File "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 63, in _initialize_model
self.midas_depth = MidasDepth(self.models_path, self.device, half_precision=self.half_precision, midas_model_type=self.depth_algorithm)
File "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth_midas.py", line 35, in __init__
self.load_midas_model(models_path, self.midas_model_filename)
File "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth_midas.py", line 42, in load_midas_model
self.midas_model = DPTDepthModel(
File "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\src\midas\dpt_depth.py", line 163, in __init__
self.load(path)
File "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\src\midas\base_model.py", line 13, in load
if "optimizer" in parameters:
TypeError: argument of type 'NoneType' is not iterable
*END OF TRACEBACK*
User friendly error message:
Error: argument of type 'NoneType' is not iterable. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \.
2023-07-19 18:17:23,179 - httpx - INFO - HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
2023-07-19 18:17:23,181 - httpx - INFO - HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
Deforum extension for auto1111 webui, v2.4b
Git commit: 858c4dd6
Saving animation frames to:
X:\Stable-Diffusion\outputs/img2img-images\Deforum_20230719181812
*START OF TRACEBACK*
Traceback (most recent call last):
File "X:\Stable-Diffusion\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 "X:\Stable-Diffusion\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\render.py", line 110, 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 "X:\Stable-Diffusion\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 \.
2023-07-19 18:18:12,869 - httpx - INFO - HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
2023-07-19 18:18:12,871 - httpx - INFO - HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
reading custom settings from deforum_settings.txt
The custom settings file does not exist. The values will be unchanged.
2023-07-19 18:33:42,794 - httpx - INFO - HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
2023-07-19 18:33:42,796 - httpx - INFO - HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
Additional information
No response
same but on mac
Error: 'Init image path or mask image path is not valid'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \. Full error message is in your terminal/ cli.
if i uncheck "use depth warping" it works. But i would assume depth warping would be a cool effect so i would like to enable this if possible
find this file then open: sd-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py find this code line:model_deleted = cls._instance and cls._instance.should_delete changed it to: model_deleted = cls._instance and True save this file
restart the webui server,try it again.