lllyasviel / lllyasviel/ControlNet

A1111 UI :: RuntimeError: PytorchStreamReader failed reading file data/25: invalid header or archive is corrupted

Open
#630 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Hello,

I've been trying to get ControlNet to function in A1111, but regardless of what I'm trying to do it always returns this error:

````
2024-01-23 22:40:49,817 - ControlNet - INFO - unit_separate = False, style_align = False
2024-01-23 22:40:50,253 - ControlNet - INFO - Loading model: control_sd15_openpose [fef5e48e]
*** Error running process: D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "D:\ai\stable-diffusion-webui\modules\scripts.py", line 718, in process
script.process(p, *script_args)
File "D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1117, in process
self.controlnet_hack(p)
File "D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1102, in controlnet_hack
self.controlnet_main_entry(p)
File "D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 882, in controlnet_main_entry
model_net, control_model_type = Script.load_control_model(p, unet, unit.model)
File "D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 343, in load_control_model
control_model = Script.build_control_model(p, unet, model)
File "D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 371, in build_control_model
state_dict = load_state_dict(model_path)
File "D:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 21, in load_state_dict
state_dict = unsafe_torch_load(ckpt_path, map_location=torch.device(location))
File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 712, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1049, in _load
result = unpickler.load()
File "D:\Program Files\Python310\lib\pickle.py", line 1213, in load
dispatch[key[0]](self)
File "D:\Program Files\Python310\lib\pickle.py", line 1254, in load_binpersid
self.append(self.persistent_load(pid))
File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1019, in persistent_load
load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 997, in load_tensor
storage = zip_file.get_storage_from_record(name, numel, torch._UntypedStorage).storage()._untyped()
RuntimeError: PytorchStreamReader failed reading file data/25: invalid header or archive is corrupted
````

I've already updated A1111 to 1.7.0, and I have uninstalled and reinstalled ControlNet twice, but still no luck.

Please advise.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/controlnet.py and scripts/utils.py, following the control_sd15_openpose loading path shown in the traceback. Reproduce the model-loading failure and inspect the referenced checkpoint before determining whether the issue is in ControlNet or the model archive. Done means documenting a reproducible cause and a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.