stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Runtime error AND AttributeError: 'NoneType' object has no attribute 'sd_model_hash' ...Also 'process_text'

Open D-Impaller opened this issue 2 years ago • 16 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

I was prompting in Anything V3, but tried to change it to another model, but then I got the following message:

Error 1 runtime error

Then I reloaded the WebUi and it already loaded the model I was trying to use. But in the next prompt, I've got the error: Error 2 Sd_Model

Then, I can't change to any model or generat images at all: Error 3 Every model

Steps to reproduce the problem

  1. Go to Stable Diffusion Checkpoint
  2. Try to change model
  3. ...

What should have happened?

It should have changed between models

Commit where the problem happens

It says Commit hash:

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Brave

Command Line Arguments

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--no-half-vae --api

call webui.bat

Additional information, context and logs

No response

D-Impaller avatar Dec 07 '22 03:12 D-Impaller

i'm having this issue too. - using Automatic1111 for 2.0 but with the new 2.1 ckpt

alenknight avatar Dec 08 '22 06:12 alenknight

i'm having this issue too. - using Automatic1111 for 2.0

xiangcp avatar Dec 09 '22 03:12 xiangcp

I had the same error too, my solution was to download the model again

rfoo avatar Dec 09 '22 09:12 rfoo

Same error, 2.0 inpainting from here:

  • https://huggingface.co/stabilityai/stable-diffusion-2-inpainting/tree/main

Possible to reload via refresh icon, then no errors, but errors during image generation. @rfoo I tried redownloading the model, same issue.

Contents of webui-user.bat

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--xformers --no-half --medvram
REM --no-half

call webui.bat

VictorZakharov avatar Dec 09 '22 12:12 VictorZakharov

I get this error when trying to use the 2.0 depth model. After that, trying to change to literally any other model gets sd_model_checkpoint errors (AttributeError: 'NoneType' object has no attribute 'sd_model_checkpoint' ) and you have to restart SD. ED: Fixed this, I wasn't properly updated.

With the 2.0 inpainting model, I get TypeError: DDPM.init() got an unexpected keyword argument 'finetune_keys'. Then the checkpoint errors thereafter. But it can be fixed by this: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3492

2.[01] 768 and 512 models work. The x4 upscaling model loads, but fails in operation due to RuntimeError: The size of tensor a (352) must match the size of tensor b (176) at non-singleton dimension 3 ED: This does not appear to be fixed.

enn-nafnlaus avatar Dec 11 '22 13:12 enn-nafnlaus

Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading weights [4c8b30e8] from /Users/bamboozle/stable-diffusion-webui/models/Stable-diffusion/sd_v2.1_f16.ckpt
Error verifying pickled file from /Users/bamboozle/stable-diffusion-webui/models/Stable-diffusion/sd_v2.1_f16.ckpt:
Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/modules/safe.py", line 81, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/zipfile.py", line 1267, in __init__
    self._RealGetContents()
  File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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 "/Users/bamboozle/stable-diffusion-webui/modules/safe.py", line 135, in load_with_extra
    check_pt(filename, extra_handler)
  File "/Users/bamboozle/stable-diffusion-webui/modules/safe.py", line 102, in check_pt
    unpickler.load()
_pickle.UnpicklingError: the STRING opcode argument must be quoted

-----> !!!! The file is most likely corrupted !!!! <-----
You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.


Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 284, in run_predict
    output = await app.blocks.process_api(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 982, in process_api
    result = await self.call_function(fn_index, inputs, iterator)
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 824, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1642, in <lambda>
    fn=lambda value, k=k: run_settings_single(value, key=k),
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1483, in run_settings_single
    if not opts.set(key, value):
  File "/Users/bamboozle/stable-diffusion-webui/modules/shared.py", line 474, in set
    self.data_labels[key].onchange()
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 63, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()))
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 340, in reload_model_weights
    load_model(checkpoint_info)
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 309, in load_model
    load_model_weights(sd_model, checkpoint_info)
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 195, in load_model_weights
    sd = read_state_dict(checkpoint_file)
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 177, in read_state_dict
    sd = get_state_dict_from_checkpoint(pl_sd)
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 151, in get_state_dict_from_checkpoint
    pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'
Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 284, in run_predict
    output = await app.blocks.process_api(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 982, in process_api
    result = await self.call_function(fn_index, inputs, iterator)
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 824, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1642, in <lambda>
    fn=lambda value, k=k: run_settings_single(value, key=k),
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1483, in run_settings_single
    if not opts.set(key, value):
  File "/Users/bamboozle/stable-diffusion-webui/modules/shared.py", line 474, in set
    self.data_labels[key].onchange()
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 63, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()))
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 334, in reload_model_weights
    if sd_model.sd_model_checkpoint == checkpoint_info.filename:
AttributeError: 'NoneType' object has no attribute 'sd_model_checkpoint'
Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 284, in run_predict
    output = await app.blocks.process_api(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 982, in process_api
    result = await self.call_function(fn_index, inputs, iterator)
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 824, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1642, in <lambda>
    fn=lambda value, k=k: run_settings_single(value, key=k),
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1483, in run_settings_single
    if not opts.set(key, value):
  File "/Users/bamboozle/stable-diffusion-webui/modules/shared.py", line 474, in set
    self.data_labels[key].onchange()
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 63, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()))
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 334, in reload_model_weights
    if sd_model.sd_model_checkpoint == checkpoint_info.filename:
AttributeError: 'NoneType' object has no attribute 'sd_model_checkpoint'
Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 284, in run_predict
    output = await app.blocks.process_api(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 982, in process_api
    result = await self.call_function(fn_index, inputs, iterator)
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 824, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1642, in <lambda>
    fn=lambda value, k=k: run_settings_single(value, key=k),
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 1483, in run_settings_single
    if not opts.set(key, value):
  File "/Users/bamboozle/stable-diffusion-webui/modules/shared.py", line 474, in set
    self.data_labels[key].onchange()
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 63, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()))
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_models.py", line 334, in reload_model_weights
    if sd_model.sd_model_checkpoint == checkpoint_info.filename:
AttributeError: 'NoneType' object has no attribute 'sd_model_checkpoint'
Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 284, in run_predict
    output = await app.blocks.process_api(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 982, in process_api
    result = await self.call_function(fn_index, inputs, iterator)
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 824, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/bamboozle/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 377, in update_token_counter
    tokens, token_count, max_length = max([model_hijack.tokenize(prompt) for prompt in prompts], key=lambda args: args[1])
  File "/Users/bamboozle/stable-diffusion-webui/modules/ui.py", line 377, in <listcomp>
    tokens, token_count, max_length = max([model_hijack.tokenize(prompt) for prompt in prompts], key=lambda args: args[1])
  File "/Users/bamboozle/stable-diffusion-webui/modules/sd_hijack.py", line 131, in tokenize
    _, remade_batch_tokens, _, _, _, token_count = self.clip.process_text([text])
AttributeError: 'NoneType' object has no attribute 'process_text'
Error completing request
Arguments: ('kik', '', 'None', 'None', 17, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 776, 768, False, 0.7, 0, 0, 0, False, False, False, False, '', 1, '', 0, '', True, False, False) {}
Traceback (most recent call last):
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 45, in f
    res = list(func(*args, **kwargs))
  File "/Users/bamboozle/stable-diffusion-webui/modules/call_queue.py", line 28, in f
    res = func(*args, **kwargs)
  File "/Users/bamboozle/stable-diffusion-webui/modules/txt2img.py", line 49, in txt2img
    processed = process_images(p)
  File "/Users/bamboozle/stable-diffusion-webui/modules/processing.py", line 464, in process_images
    res = process_images_inner(p)
  File "/Users/bamboozle/stable-diffusion-webui/modules/processing.py", line 518, in process_images_inner
    processed = Processed(p, [], p.seed, "")
  File "/Users/bamboozle/stable-diffusion-webui/modules/processing.py", line 254, in __init__
    self.sd_model_hash = shared.sd_model.sd_model_hash
AttributeError: 'NoneType' object has no attribute 'sd_model_hash'

Gitterman69 avatar Dec 12 '22 12:12 Gitterman69

"zipfile.BadZipFile: File is not a zip file" - sounds like the file is corrupted, rather than structured wrong. I'd re-download it.

enn-nafnlaus avatar Dec 12 '22 12:12 enn-nafnlaus

I deleted /venv and /repositories folders and then ran webui-user.bat and after everything reinstalled it's working for me w/ all models

nopejessDF4L avatar Dec 14 '22 20:12 nopejessDF4L

On m1/m2 architecture?

On Wed, Dec 14, 2022 at 21:51, nopejessDF4L @.***> wrote:

I deleted /venv and /repositories folders and then ran webui-user.bat and after everything reinstalled it's working for me w/ all models

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Gitterman69 avatar Dec 14 '22 20:12 Gitterman69

I deleted /venv and /repositories folders and then ran webui-user.bat and after everything reinstalled it's working for me w/ all models

this did not fix the problem for me

rikesuh avatar Dec 15 '22 08:12 rikesuh

I deleted /venv and /repositories folders and then ran webui-user.bat and after everything reinstalled it's working for me w/ all models

this did not fix the problem for me

Hey, I had the same issue and finally figured out why it was producing an error. In the settings tab, check if you're using a VAE. My issue was that I had a VAE loaded that wasn't compatible with the checkpoint. Specifically for me, I was trying to use 4x-upscaler. So reload the .bat, go to settings, and switch off the specific VAE you are trying to use before you attempt to load the model having the issue.

ogzander avatar Dec 16 '22 20:12 ogzander

Having the same problem, getting AttributeError: 'NoneType' object has no attribute 'sd_model_hash', none of the solutions above worked for me

sarperdag avatar Dec 19 '22 16:12 sarperdag

Got the same issue and none of the above recommendations helped.

hristo-naydenov avatar Jan 02 '23 13:01 hristo-naydenov

Same for me, no sd v2.x and based sd v2.x model works. using m2.

DearDhruv avatar Jan 18 '23 14:01 DearDhruv

same for meTraceback (most recent call last): File "D:\SDwebui\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\SDwebui\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "D:\SDwebui\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data processed_input.append(block.preprocess(inputs[i])) File "D:\SDwebui\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 425, in svgPreprocess return input_image.orgpreprocess(inputs) File "D:\SDwebui\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1508, in preprocess mask_im = processing_utils.decode_base64_to_image(mask) File "D:\SDwebui\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image content = encoding.split(";")[1] AttributeError: 'NoneType' object has no attribute 'split'

xiewoc avatar Mar 09 '23 15:03 xiewoc

I figured this out: it's probably caused by using a model of control net which is not included in your file like''models/Controlnet'' etc. so just can fix this by not using that model like''openpose''

xiewoc avatar Mar 09 '23 15:03 xiewoc

Solution In 2023. i think errors occur due to a virus risk WARNING thats why its doesn't loads try this ...

I fixed the problem by pasting these line of code in webui-user file . Here's The Code :- "git pull @echo off

set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--disable-safe-unpickle call webui.bat"

just paste it and try run again and non attribute error will be gone .

Daaihere avatar May 05 '23 19:05 Daaihere

changing setting sd_model_checkpoint to mdjrny-v4.ckpt [550a5f9a4b]: AttributeError
Traceback (most recent call last):
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/shared.py", line 597, in set
    self.data_labels[key].onchange()
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/home/lizhou/projestc/stable-diffusion-webui/webui.py", line 225, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 537, in reload_model_weights
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 271, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 257, in read_state_dict
    sd = get_state_dict_from_checkpoint(pl_sd)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 206, in get_state_dict_from_checkpoint
    pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'

ZoeLeee avatar Jun 14 '23 16:06 ZoeLeee

I am having issue where earlier i never get problem with Dreambooth Collabs where I use train model and once I created CKPT I use to merge those models with Dreamshaper or Photon in Automic1111 but recently I am having issue where Whatever train model in Dreambooth Collab which link is following https://colab.research.google.com/github/ShivamShrirao/diffusers/blob/main/examples/dreambooth/DreamBooth_Stable_Diffusion.ipynb#scrollTo=lJoOgLQHnC8L once I download and merge CKPT with another model then I get an error

Error merging checkpoints: 'NoneType' object has no attribute 'pop' Time taken: 12.6 sec. A: 2.50 GB, R: 2.55 GB, Sys: 4.6/7.99609 GB (58.1%) which very annoying

please note my earlier models before I started face problem those model get merge with other models but Now recently whatever I train model they don't merge and I get above error please help

ameets21 avatar Oct 18 '23 18:10 ameets21

changing setting sd_model_checkpoint to mdjrny-v4.ckpt [550a5f9a4b]: AttributeError
Traceback (most recent call last):
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/shared.py", line 597, in set
    self.data_labels[key].onchange()
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/home/lizhou/projestc/stable-diffusion-webui/webui.py", line 225, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 537, in reload_model_weights
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 271, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 257, in read_state_dict
    sd = get_state_dict_from_checkpoint(pl_sd)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 206, in get_state_dict_from_checkpoint
    pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'

I'm having the exactly same issue as you. 'NoneType' object has no attribute 'pop'. But mine is with a model I trained myself with Dreambooth. Did you end up finding a solution to your problem?

Valachio avatar Nov 09 '23 05:11 Valachio

changing setting sd_model_checkpoint to mdjrny-v4.ckpt [550a5f9a4b]: AttributeError
Traceback (most recent call last):
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/shared.py", line 597, in set
    self.data_labels[key].onchange()
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/home/lizhou/projestc/stable-diffusion-webui/webui.py", line 225, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 537, in reload_model_weights
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 271, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 257, in read_state_dict
    sd = get_state_dict_from_checkpoint(pl_sd)
  File "/home/lizhou/projestc/stable-diffusion-webui/modules/sd_models.py", line 206, in get_state_dict_from_checkpoint
    pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'

I'm having the exactly same issue as you. 'NoneType' object has no attribute 'pop'. But mine is with a model I trained myself with Dreambooth. Did you end up finding a solution to your problem?

I am ALSO having the same issue as both of you. Makes me wonder if somethings wrong with the collab...

GenteCaptain avatar Nov 17 '23 19:11 GenteCaptain

Also having this exact same issue. Something is def wrong with the Collab notebook output at the moment.

voltaireodactyl avatar Nov 30 '23 23:11 voltaireodactyl

having same issue on macos m1 chip

anibaljasin avatar Dec 05 '23 01:12 anibaljasin

Solution In 2023. i think errors occur due to a virus risk WARNING thats why its doesn't loads try this ...

I fixed the problem by pasting these line of code in webui-user file . Here's The Code :- "git pull @echo off

set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--disable-safe-unpickle call webui.bat"

just paste it and try run again and non attribute error will be gone .

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5490#issuecomment-1536693680 This resolved the issue for me

playrth avatar Jan 17 '24 01:01 playrth