I'm trying to get ControlNet to work (on Automatic1111), but I'm getting this error:

#14
by jargonaut - opened

Error verifying pickled file from C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_sd15_canny.pth: Traceback (most recent call last): File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\modules\safe.py", line 131, in load_with_extra check_pt(filename, extra_handler) File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\modules\safe.py", line 84, in check_pt check_zip_filenames(filename, z.namelist()) File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\modules\safe.py", line 76, in check_zip_filenames raise Exception(f"bad file inside {filename}: {name}") Exception: bad file inside C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_sd15_canny.pth: canny_hao/data.pkl

The file may be malicious, so the program is not going to read it. You can skip this check with --disable-safe-unpickle commandline argument.

In modules, there is a script called "shared" - you need to go into there and change the default to "True".

arser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=True)

I had this same error, and this did kind of fix the problem. but it just broke again further down. As the error message notes "disabling safe unpickle probably won't help". I finally figured out it was a corrupted model for me. Redownloaded the model and it cleared the error.

In modules, there is a script called "shared" - you need to go into there and change the default to "True".

arser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=True)

Thanks, this helped, but now I'm getting this error. Any advice?

Loading model: control_sd15_canny [fef5e48e]
Loaded state_dict from [C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_sd15_canny.pth]
Error running process: C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\modules\scripts.py", line 327, in process
script.process(p, *script_args)
File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 735, in process
model_net = self.load_control_model(p, unet, model, lowvram)
File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 534, in load_control_model
model_net = self.build_control_model(p, unet, model, lowvram)
File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 572, in build_control_model
network = network_module(
File "C:\Users\17708\Documents\SUPER SD 2.0\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\cldm.py", line 109, in init
self.control_model.to(devices.get_device_for("controlnet"))
AttributeError: module 'modules.devices' has no attribute 'get_device_for'

This comment has been hidden

Error verifying pickled file from C:\ai\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads\openpose\body_pose_model.pth:
Traceback (most recent call last):
File "C:\ai\stable-diffusion-webui\modules\safe.py", line 78, in check_pt
with zipfile.ZipFile(filename) as z:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in init
self._RealGetContents()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1334, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ai\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
check_pt(filename, extra_handler)
File "C:\ai\stable-diffusion-webui\modules\safe.py", line 99, in check_pt
unpickler.load()
File "C:\ai\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
return TypedStorage(_internal=True)
TypeError: TypedStorage.new() got an unexpected keyword argument '_internal'

I've been trying to get this to run for hours, uninstalled everything reinstalled, gone through all the tutorials I can find. I add the extension, it shows up on the extension list activated, but I don't see controller in setting or on txt2image and img2img tabs. Does anyone know what the problem could be?

I've been trying to get this to run for hours, uninstalled everything reinstalled, gone through all the tutorials I can find. I add the extension, it shows up on the extension list activated, but I don't see controller in setting or on txt2image and img2img tabs. Does anyone know what the problem could be?

I have the same problem. Have you been able to solve it?

This comment has been hidden

I'm getting this error:
Error running process: E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "E:\AI_anime_SDv2\stable-diffusion-webui\modules\scripts.py", line 418, in process
script.process(p, *script_args)
File "E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 736, in process
model_net = Script.load_control_model(p, unet, unit.model, unit.low_vram)
File "E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 292, in load_control_model
model_net = Script.build_control_model(p, unet, model, lowvram)
File "E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 302, in build_control_model
raise RuntimeError(f"You have not selected any ControlNet Model.")
RuntimeError: You have not selected any ControlNet Model.

After the first "GENERATE" button press, SD just stops and won't generate error logs or other images. Please help me solve this.
I've got the latest July 30 version.

You need control net model RuntimeError: You have not selected any ControlNet Model.

I'm getting this error:
Error running process: E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "E:\AI_anime_SDv2\stable-diffusion-webui\modules\scripts.py", line 418, in process
script.process(p, *script_args)
File "E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 736, in process
model_net = Script.load_control_model(p, unet, unit.model, unit.low_vram)
File "E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 292, in load_control_model
model_net = Script.build_control_model(p, unet, model, lowvram)
File "E:\AI_anime_SDv2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 302, in build_control_model
raise RuntimeError(f"You have not selected any ControlNet Model.")
RuntimeError: You have not selected any ControlNet Model.

After the first "GENERATE" button press, SD just stops and won't generate error logs or other images. Please help me solve this.
I've got the latest July 30 version.

try this https://youtu.be/xMmCZ1EqMVA?list=PLkIRB85csS_uclR99OGshp1UCp50a8nvM

Sign up or log in to comment