zxix/stable-diffusion-pickle-scanner

Unable to run scanner - AttributeError: 'dict' object has no attribute 'calls'

nitingrg opened this issue · 14 comments

Getting this error when I run the .cmd file.

"Scanning...Please wait a moment..."
"step 1: SD models folder"
Traceback (most recent call last):
  File "H:\stabledif\stable-diffusion-webui\pickle_scan.py", line 37, in <module>
    for c in result.calls:
AttributeError: 'dict' object has no attribute 'calls'

getting the same error

same here

exact same error here.

#metoo

Same

Me, too.

Also getting the error when trying to run

I'm getting the same error

Same error.

no fix for this?

It's also mentioned here (#3), but I don't understand what was possibly done to fix it.

Have managed to stop the error. What I did was the following:
Within your Autotomatic 1111 install folder, go to the following folder: venv\Lib\site-packages\torch
Open the serialization.py file
Around line 760, look for the following:

    if weights_only:
        if pickle_module is not None:
            raise RuntimeError("Can not safely load weights when expiclit picke_module is specified")
    else:
        pickle_module = pickle
        
    _check_dill_version(pickle_module)

Change it to the following:

    if weights_only:
        if pickle_module is not None:
            raise RuntimeError("Can not safely load weights when expiclit picke_module is specified")
    else:
        if pickle_module is None:
            pickle_module = pickle

    _check_dill_version(pickle_module)

You really only need to remove the line after 'else' and replace it with the 2 new lines
The pickle script then ran without error for me.

@jonk999 #17 (I'm not python dev, what's about my fix)?

I'm not a python dev either sorry. I just fumbled my way through looking at the threads of the issue here and that's what looked to fix it for me.