Need advice: PytorchStreamReader failed reading zip archive

I’m new to this and I’m trying to get SD running on my local Windows 10 machine in an Anaconda Powershell Prompt. I’ve been sorting out dependencies but I’ve run into an error I can’t figure out:

(ldm) PS C:\Users\dev_w\Documents\GitHub\stable-diffusion> python scripts/ --prompt "prompt in space" --plms --ckpt sd-v1-4.ckpt --skip_grid --n_samples 1
Global seed set to 42
Loading model from sd-v1-4.ckpt
Traceback (most recent call last):
  File "scripts/", line 352, in <module>
  File "scripts/", line 246, in main
    model = load_model_from_config(config, f"{opt.ckpt}")
  File "scripts/", line 51, in load_model_from_config
    pl_sd = torch.load(ckpt, map_location="cpu")
  File "C:\Users\dev_w\miniconda3\envs\ldm\lib\site-packages\torch\", line 705, in load
    with _open_zipfile_reader(opened_file) as opened_zipfile:
  File "C:\Users\dev_w\miniconda3\envs\ldm\lib\site-packages\torch\", line 243, in __init__
    super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted

I’m not sure what zip file it’s trying to read. I re-downloaded sd-v1-4.ckpt but it didn’t help. Here’s the output from transformers-cli.exe env:

(ldm) PS C:\Users\dev_w\Documents\GitHub\stable-diffusion> transformers-cli.exe env
Traceback (most recent call last):
  File "c:\users\dev_w\miniconda3\envs\ldm\lib\", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\dev_w\miniconda3\envs\ldm\lib\", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\dev_w\miniconda3\envs\ldm\Scripts\transformers-cli.exe\", line 4, in <module>
  File "c:\users\dev_w\miniconda3\envs\ldm\lib\site-packages\transformers\commands\", line 26, in <module>
    from .user import UserCommands
  File "c:\users\dev_w\miniconda3\envs\ldm\lib\site-packages\transformers\commands\", line 20, in <module>
    from huggingface_hub.hf_api import HfFolder, create_repo, login, logout, whoami
ImportError: cannot import name 'login' from 'huggingface_hub.hf_api' (c:\users\dev_w\miniconda3\envs\ldm\lib\site-packages\huggingface_hub\

Any help is appreciated!

Did you manage to solve this? have same problem too

No, not yet. I haven’t been able to get anyone to respond to me.