Automatic webui detects a pickle and don't loads it

#2
by N75242 - opened

It's a problem quite present in Automatic since some time now, and you can find lots of bug repport on it : https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2235

If you look in the "files and versions" tab on my repository here, you can see a "Safe" badge next to the ckpt file, showing that HuggingFace scanned it. I know I personally do have to add "--disable-safe-unpickle" to my options because of this, any dreambooth model seems to act the same for me

Guizmus changed discussion status to closed

Ok thanks, I'm sure its fine, but I don't want to disable safety for all other models just in case. In my case your models are the only ones that webui had trouble loading, I think there is a difference in your model vs other dreambooth because others load just fine. Hope you can find the difference, probably its just a very simple fix.

@Guizmus , your ckpt contains the directory structure:

/DarkSoulsStyle-9000 
     /data
         /111
         /222
    /data.pkl
   /version

This should be:

/archive
     /data
         /111
         /222
    /data.pkl
   /version

as expected by a1111 and torch

What did you use to train the model?

Other than that, your checkpoint passes https://github.com/zxix/stable-diffusion-pickle-scanner

What did you use to train the model?

I trained this using Shivam (link). The ckpt though, I made with a different script that I updated since, I'm not on the same tool anymore (I use EveryDream right now)

Next version should not have this problem, thanks for the analyse, I didn't know what was wrong in the ckpt and thought the error was wrong...

Hum... I just checked and I use the original script from HF : https://github.com/huggingface/diffusers/blob/main/scripts/convert_diffusers_to_original_stable_diffusion.py
I'll try to see how to modify this "DarkSoulsStyle-9000" to archive, it's the name of the last learning folder that seems to be there

Guizmus changed discussion status to open

That is caused by using pytorch 1.13 for saving, previously torch saved models (which are just zips) were internally named "archive/[whatever]" but as of torch 1.13 it now uses the filename instead of archive, causing some UIs safety checking to fail.

So if I make the ckpt again from the diffuser after naming the folder "archive", it should trick it, I'll try. Thanks a lot for this explaination @metrolobo

it didn't work, I'll make another "convert" environment on 1.12 then. it's a "lol" problem at that point

Ok I fixed it by reverting my env to 1.12. I'll reupload it. Thanks for the heads up and the solve. I'll close the issue once it's online

thanks, happy to see it's resolved properly

Ok, the new version is online (I renamed it v1-3) and removed the badly saved one. Now I just have to fix all my other models lol

Guizmus changed discussion status to closed

can you add the command line becuase I'm not sure if you can add it

I downloaded the new Control net model in Stable Diffusion and have bee getting this error:

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.

Error running process: C:\Stable diffusion\stable-diffusion-webui-master\extensions\sd-webui-controlnet\scripts\controlnet.py

Can anyone please suggest something

Given what you are saying, your problem is in controlnet, not in my dark souls model.

I put a .safetensors out though, so it should be a good alternative here too. https://huggingface.co/Guizmus/DarkSoulsDiffusion/resolve/main/DarkSoulsStyle_v1-3.safetensors

Sign up or log in to comment