Repository: stable-diffusion-webui
Issue: [Bug]: Error message: Expected state_dict to be dict-like and TypeError: 'NoneType' object is not subscriptable
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

I got an error when running stable diffusion the first process : TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>

I got this on cmd line:
```
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 0.9s (load scripts: 0.1s, create ui: 0.6s, gradio launch: 0.2s).
Error verifying pickled file from C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\models\VAE-approx\model.pt:
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'


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 completing request
Arguments: ('task(2qf3bs19a5m2l1i)', 'a girl in the night', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, <controlnet.py.UiControlNetUnit object at 0x00000269D8920B50>, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, 50) {}
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 515, in process_images
    res = process_images_inner(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
    return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 608, in process_images_inner
    sd_vae_approx.model()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_vae_approx.py", line 42, in model
    sd_vae_approx_model.load_state_dict(torch.load(model_path, map_location='cpu' if devices.device.type != 'cuda' else None))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1624, in load_state_dict
    raise TypeError("Expected state_dict to be dict-like, got {}.".format(type(state_dict)))
TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>.

When I check generate again I get the image processed (restore face is not checked)
Running on local URL:  http://127.0.0.1:7860

 85%|█████████████████████████████████████████████████████████████████████▋            | 17/20 [00:03<00:00,  8.82it/s]ERROR:    Exception in ASGI application███████████████████████████████████████          | 17/20 [00:01<00:00, 10.69it/s]
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 429, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
    raise e
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app
    response = await func(request)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\progress.py", line 93, in progressapi
    shared.state.set_current_image()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\shared.py", line 175, in set_current_image
    self.do_set_current_image()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\shared.py", line 183, in do_set_current_image
    self.assign_current_image(modules.sd_samplers.samples_to_image_grid(self.current_latent))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 50, in samples_to_image_grid
    return images.image_grid([single_sample_to_image(sample, approximation) for sample in samples])
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 50, in <listcomp>
    return images.image_grid([single_sample_to_image(sample, approximation) for sample in samples])
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 35, in single_sample_to_image
    x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_vae_approx.py", line 28, in forward
    x = layer(x)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\extensions-builtin\Lora\lora.py", line 323, in lora_Conv2d_forward
    return torch.nn.Conv2d_forward_before_lora(self, input)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00,  5.08it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  9.90it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00, 10.61it/s]

And when I generate the image again with "restore faces" checked, the image does not get processed with following error: TypeError: 'NoneType' object is not subscriptable

Command line:
Error verifying pickled file from C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\models\Codeformer\codeformer-v0.1.0.pth:██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 10.46it/s]
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'


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 completing request
Arguments: ('task(7gj2wez89fx0jg9)', 'a girl in the night', '', [], 20, 0, True, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, <controlnet.py.UiControlNetUnit object at 0x00000269D8922380>, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, 50) {}
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 515, in process_images
    res = process_images_inner(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
    return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 700, in process_images_inner
    x_sample = modules.face_restoration.restore_faces(x_sample)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\face_restoration.py", line 19, in restore_faces
    return face_restorer.restore(np_image)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\codeformer_model.py", line 88, in restore
    self.create_models()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\codeformer_model.py", line 65, in create_models
    checkpoint = torch.load(ckpt_path)['params_ema']
TypeError: 'NoneType' object is not subscriptable


Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:14<00:00, 10.46it/s]
```

I made a manuel download of codeformer and replaced the old file. But it gave the same error message. Temporary files I didn't find. 

How can I solve this problem?

Thank you for your help.
Holger




### Steps to reproduce the problem

See above. Stable diffusion has been running normal last days. Today I installed a common embedding "easynegatives.safetensor2 and since then I have this issue. I already deleted this embedding 

### What should have happened?

Stable diffusion shall launch without error messages and generate images also with "restore faces"

### Commit where the problem happens

venv "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Commit hash: 72cd27a13587c9579942577e9e3880778be195f6

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Microsoft Edge

### Command Line Arguments

```Shell
set PYTHON="C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe"
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --xformers --theme dark
git pull
call webui.bat
```


### List of extensions

canvas-zoom
openpose-editor
sd-3dmodel-loader
sd-webui-ar
sd-webui-controlnet

### Console logs

```Shell
Already up to date.
venv "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 72cd27a13587c9579942577e9e3880778be195f6
Installing requirements


Launching Web UI with arguments: --xformers --theme dark
==============================================================================
You are running torch 1.13.1+cu117.
The program is tested to work with torch 2.0.0.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
=================================================================================
You are running xformers 0.0.16rc425.
The program is tested to work with xformers 0.0.17.
To reinstall the desired version, run with commandline flag --reinstall-xformers.

Use --skip-version-check commandline argument to disable this check.
=================================================================================
ControlNet v1.1.123
ControlNet v1.1.123
Loading weights [f8bb2922e1] from C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\models\Stable-diffusion\revAnimated_v122.safetensors
Creating model from config: C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 4.7s (load weights from disk: 0.2s, create model: 0.3s, apply weights to model: 2.2s, apply half(): 0.3s, move model to device: 0.8s, load textual inversion embeddings: 1.0s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 10.7s (import torch: 1.5s, import gradio: 0.6s, import ldm: 0.6s, other imports: 1.3s, list SD models: 0.1s, load scripts: 0.8s, load SD checkpoint: 4.9s, create ui: 0.8s).
Closing server running on port: 7860
Restarting UI...
ControlNet v1.1.123
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 0.9s (load scripts: 0.1s, create ui: 0.6s, gradio launch: 0.2s).
Error verifying pickled file from C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\models\VAE-approx\model.pt:
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'


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 completing request
Arguments: ('task(2qf3bs19a5m2l1i)', 'a girl in the night', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, <controlnet.py.UiControlNetUnit object at 0x00000269D8920B50>, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, 50) {}
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 515, in process_images
    res = process_images_inner(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
    return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 608, in process_images_inner
    sd_vae_approx.model()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_vae_approx.py", line 42, in model
    sd_vae_approx_model.load_state_dict(torch.load(model_path, map_location='cpu' if devices.device.type != 'cuda' else None))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1624, in load_state_dict
    raise TypeError("Expected state_dict to be dict-like, got {}.".format(type(state_dict)))
TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>.

 85%|█████████████████████████████████████████████████████████████████████▋            | 17/20 [00:03<00:00,  8.82it/s]ERROR:    Exception in ASGI application███████████████████████████████████████          | 17/20 [00:01<00:00, 10.69it/s]
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 429, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                                       | 18/20 [00:01<00:00, 10.40it/s]ERROR:    Exception in ASGI application██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                                     | 18/20 [00:01<00:00, 10.61it/s]
Traceback (most recent call last):usin\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 429, in run_asgi
    result = await app(  # type: ignore[func-returns-value]ui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)iffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
    await super().__call__(scope, receive, send)ffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)on-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise excers\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)able-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
    await responder(scope, receive, send)able-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise excers\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)ble-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
    raise eUsers\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)table-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)e-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)table-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app
    response = await func(request)usin\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app
    raw_response = await run_endpoint_function(iffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)i\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)n-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(bui\modules\progress.py", line 93, in progressapi
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await futureesktop\Diffusin\stable-diffusion-webui\modules\shared.py", line 175, in set_current_image
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)n\stable-diffusion-webui\modules\shared.py", line 183, in do_set_current_image
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\progress.py", line 93, in progressapi
    shared.state.set_current_image()in\stable-diffusion-webui\modules\sd_samplers_common.py", line 50, in samples_to_image_grid
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\shared.py", line 175, in set_current_image
    self.do_set_current_image()iffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 50, in <listcomp>
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\shared.py", line 183, in do_set_current_image
    self.assign_current_image(modules.sd_samplers.samples_to_image_grid(self.current_latent)) line 35, in single_sample_to_image
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 50, in samples_to_image_grid
    return images.image_grid([single_sample_to_image(sample, approximation) for sample in samples])es\module.py", line 1194, in _call_impl
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 50, in <listcomp>
    return images.image_grid([single_sample_to_image(sample, approximation) for sample in samples])n forward
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_samplers_common.py", line 35, in single_sample_to_image
    x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()odule.py", line 1194, in _call_impl
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)able-diffusion-webui\extensions-builtin\Lora\lora.py", line 323, in lora_Conv2d_forward
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\sd_vae_approx.py", line 28, in forward
    x = layer(x)\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)able-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\extensions-builtin\Lora\lora.py", line 323, in lora_Conv2d_forward
    return torch.nn.Conv2d_forward_before_lora(self, input)float) should be the same
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
    return self._conv_forward(input, self.weight, self.bias)███████████████████████████| 20/20 [00:02<00:00,  9.90it/s]
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  9.68it/s]
Error verifying pickled file from C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\models\Codeformer\codeformer-v0.1.0.pth:██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 10.46it/s]
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'


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 completing request
Arguments: ('task(7gj2wez89fx0jg9)', 'a girl in the night', '', [], 20, 0, True, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, <controlnet.py.UiControlNetUnit object at 0x00000269D8922380>, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, 50) {}
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 515, in process_images
    res = process_images_inner(p)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
    return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\processing.py", line 700, in process_images_inner
    x_sample = modules.face_restoration.restore_faces(x_sample)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\face_restoration.py", line 19, in restore_faces
    return face_restorer.restore(np_image)
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\codeformer_model.py", line 88, in restore
    self.create_models()
  File "C:\Users\User\Desktop\Diffusin\stable-diffusion-webui\modules\codeformer_model.py", line 65, in create_models
    checkpoint = torch.load(ckpt_path)['params_ema']
TypeError: 'NoneType' object is not subscriptable


Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:14<00:00, 10.46it/s]
```


### Additional information

I am not a professional user. Please take this into consideration.