Skip to content

[Bug]: AttributeError: 'NoneType' object has no attribute 'get' #17064

@war-nightmare

Description

@war-nightmare

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

the issue happened when i train hypernetwork

Image

Steps to reproduce the problem

preprocess the image
train the hypernetwork model
then the issue happend

What should have happened?

start training the issue

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2025-07-23-08-32.txt

Console logs

*** Error verifying pickled file from D:\code\sd-webui-aki-v4.10\models\hypernetworks\mural-restore.pt
*** 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.
***
    Traceback (most recent call last):
      File "D:\code\sd-webui-aki-v4.10\modules\safe.py", line 137, in load_with_extra
        check_pt(filename, extra_handler)
      File "D:\code\sd-webui-aki-v4.10\modules\safe.py", line 84, in check_pt
        check_zip_filenames(filename, z.namelist())
      File "D:\code\sd-webui-aki-v4.10\modules\safe.py", line 76, in check_zip_filenames
        raise Exception(f"bad file inside {filename}: {name}")
    Exception: bad file inside D:\code\sd-webui-aki-v4.10\models\hypernetworks\mural-restore.pt: archive/.format_version

---
Applying attention optimization: sdp... done.
*** Error completing request
*** Arguments: ('task(2gmsdezwnvylszq)', 'mural-restore', '0.00001', 1, 1, 'D:\\code\\sdfile\\sd_processed', 'textual_inversion', 512, 512, False, 100000, 'disabled', '0.1', False, 0, 'once', False, 500, 500, 'style_filewords.txt', False, '', '', 20, 'DPM++ 2M Karras', 7, -1, 512, 512) {}
    Traceback (most recent call last):
      File "D:\code\sd-webui-aki-v4.10\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^
      File "D:\code\sd-webui-aki-v4.10\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^
      File "D:\code\sd-webui-aki-v4.10\modules\hypernetworks\ui.py", line 25, in train_hypernetwork
        hypernetwork, filename = modules.hypernetworks.hypernetwork.train_hypernetwork(*args)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\code\sd-webui-aki-v4.10\modules\hypernetworks\hypernetwork.py", line 482, in train_hypernetwork
        hypernetwork.load(path)
      File "D:\code\sd-webui-aki-v4.10\modules\hypernetworks\hypernetwork.py", line 249, in load
        self.layer_structure = state_dict.get('layer_structure', [1, 2, 1])
                               ^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'get'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions