StableVideo icon indicating copy to clipboard operation
StableVideo copied to clipboard

PytorchStreamReader failed reading zip archive: failed finding central directory

Open shoefang opened this issue 2 years ago • 3 comments

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?

shoefang avatar Nov 01 '23 02:11 shoefang

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

rese1f avatar Nov 10 '23 04:11 rese1f

image where should I add this?

shoefang avatar Nov 10 '23 07:11 shoefang

can u also download the ckpt again?

rese1f avatar Nov 10 '23 17:11 rese1f