Skip to content

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

@shoefang

Description

@shoefang

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions