Repository: stable-diffusion-webui
Issue: [Bug]: Creating new embedding.pt fails pickle check
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] 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
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Whenever I create a new embedding, the pickle check fails to verify the new created file.
Old embeddings are read without any problem.
(This is my first new TI training since the 1.8.0 update)

### Steps to reproduce the problem

1. Training tab
2. Create embedding

### What should have happened?

.pt file should pass the pickle check 

### What browsers do you use to access the UI ?

Google Chrome

### Sysinfo

[sysinfo-2024-03-11-06-37.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/14554560/sysinfo-2024-03-11-06-37.json)


### Console logs

```Shell
venv "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
Launching Web UI with arguments: --xformers
2024-03-11 07:46:14.167317: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\venv\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.

Loading weights [6ce0161689] from C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\configs\v1-inference.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 16.2s (prepare environment: 2.2s, import torch: 4.4s, import gradio: 1.0s, setup paths: 6.3s, initialize shared: 0.2s, other imports: 0.6s, list SD models: 0.1s, load scripts: 0.6s, create ui: 0.5s, gradio launch: 0.3s).
Applying attention optimization: xformers... done.
*** Error verifying pickled file from C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\embeddings\Test_embed.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 "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\modules\safe.py", line 137, in load_with_extra
        check_pt(filename, extra_handler)
      File "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\modules\safe.py", line 84, in check_pt
        check_zip_filenames(filename, z.namelist())
      File "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\modules\safe.py", line 76, in check_zip_filenames
        raise Exception(f"bad file inside {filename}: {name}")
    Exception: bad file inside C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\embeddings\Test_embed.pt: Test_embed/byteorder

---
*** Error loading embedding Test_embed.pt
    Traceback (most recent call last):
      File "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 184, in load_from_file
        embedding = create_embedding_from_data(data, name, filename=filename, filepath=path)
      File "C:\Users\black\stable-diffusion-webui\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 284, in create_embedding_from_data
        if 'string_to_param' in data:  # textual inversion embeddings
    TypeError: argument of type 'NoneType' is not iterable

---
Model loaded in 3.6s (load weights from disk: 0.1s, create model: 0.5s, apply weights to model: 2.1s, load textual inversion embeddings: 0.5s, calculate empty prompt: 0.1s).
```


### Additional information

_No response_