Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PytorchStreamReader failed reading zip archive: failed finding central directory #19

Open
shoefang opened this issue Nov 1, 2023 · 3 comments

Comments

@shoefang
Copy link

shoefang commented Nov 1, 2023

Loaded model config from [ckpt/cldm_v15.yaml]
Loaded state_dict from [ckpt/control_sd15_canny.pth]
/home/xufang/ProgramFiles/anaconda3/envs/stablevideo/lib/python3.11/site-packages/timm/models/_factory.py:114: UserWarning: Mapping deprecated model name vit_base_resnet50_384 to current vit_base_r50_s16_384.orig_in21k_ft_in1k.
model = create_fn(
Traceback (most recent call last):
File "/home/xufang/StableVideo/app.py", line 359, in
stablevideo.load_depth_model()
File "/home/xufang/StableVideo/app.py", line 60, in load_depth_model
self.apply_midas = MidasDetector()
^^^^^^^^^^^^^^^
File "/home/xufang/StableVideo/annotator/midas/init.py", line 11, in init
self.model = MiDaSInference(model_type="dpt_hybrid").cuda()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xufang/StableVideo/annotator/midas/api.py", line 161, in init
model, _ = load_model(model_type)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/xufang/StableVideo/annotator/midas/api.py", line 96, in load_model
model = DPTDepthModel(
^^^^^^^^^^^^^^
File "/home/xufang/StableVideo/annotator/midas/midas/dpt_depth.py", line 105, in init
self.load(path)
File "/home/xufang/StableVideo/annotator/midas/midas/base_model.py", line 11, in load
parameters = torch.load(path, map_location=torch.device('cpu'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xufang/ProgramFiles/anaconda3/envs/stablevideo/lib/python3.11/site-packages/torch/serialization.py", line 993, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xufang/ProgramFiles/anaconda3/envs/stablevideo/lib/python3.11/site-packages/torch/serialization.py", line 447, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

I encountered a problem when loading from control_sd15_depth.pth. It seems there is something wrong with the function MidasDetector(). Because when I replace it with CannyDetector() the program can run but cannot generate background editing video. how to fix it?

@rese1f
Copy link
Owner

rese1f commented Nov 10, 2023

it seems like causing by the PyTorch version, try this good luck!

@shoefang
Copy link
Author

image
where should I add this?

@rese1f
Copy link
Owner

rese1f commented Nov 10, 2023

can u also download the ckpt again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants