Repository: stable-diffusion-webui
Issue: [Bug]: Training textual inversion fails
Labels: bug-report

### Checklist

- [X] 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
- [X] 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?

Under Train tab, Train sub-tab, clicking Train Embedding fails

### Steps to reproduce the problem

1. Go to Train tab
2. Create Embedding sub-tab, create a new embedding
3. Go to Train sub-tab
4. Fill out the form to create an embedding
5. Click Train Embedding
6. See error in console

### What should have happened?

WebUI should have begun the training process

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

Google Chrome

### Sysinfo

[sysinfo-2024-01-19-04-18.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/13984185/sysinfo-2024-01-19-04-18.json)


### Console logs

```Shell
venv "D:\diffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
#######################################################################################################
Initializing Civitai Link
If submitting an issue on github, please provide the below text for debugging purposes:

Python revision: 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Civitai Link revision: 2dfc03c17304278ca0b456366cc7871a2af8377b
SD-WebUI revision: cf2772fab0af5573da775e7437e6acdca424f26e

Checking Civitai Link requirements...
[!] python-socketio[client] version 5.7.2 NOT installed.

#######################################################################################################
Launching Web UI with arguments: --opt-sdp-attention --opt-split-attention --opt-sub-quad-attention --no-half-vae
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 1.13.1+cu117 with CUDA 1107 (you have 2.0.0+cu118)
    Python  3.10.9 (you have 3.10.10)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 23.9.2, num models: 12
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████| 1309/1309 [00:00<00:00, 59583.74it/s]
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████| 1309/1309 [00:00<00:00, 59500.44it/s]
2024-01-18 23:07:33,144 - ControlNet - INFO - ControlNet v1.1.226
ControlNet preprocessor location: D:\diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-01-18 23:07:33,240 - ControlNet - INFO - ControlNet v1.1.226
Hypernetwork-MonkeyPatch-Extension not found
Civitai: API loaded
Loading weights [1a189f0be6] from D:\diffusion\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned.safetensors
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-ar\scripts\sd-webui-ar.py:414: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  arc_calc_height = gr.Button(value="Calculate Height").style(
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-ar\scripts\sd-webui-ar.py:414: GradioDeprecationWarning: Use `scale` in place of full_width in the constructor. scale=1 will make the button expand, whereas 0 will not.
  arc_calc_height = gr.Button(value="Calculate Height").style(
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-ar\scripts\sd-webui-ar.py:422: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  arc_calc_width = gr.Button(value="Calculate Width").style(
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-ar\scripts\sd-webui-ar.py:422: GradioDeprecationWarning: Use `scale` in place of full_width in the constructor. scale=1 will make the button expand, whereas 0 will not.
  arc_calc_width = gr.Button(value="Calculate Width").style(
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py:165: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  with gr.Row(elem_classes=["cnet-image-row"]).style(equal_height=True):
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py:179: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  self.generated_image = gr.Image(
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\metadata_editor.py:399: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  with gr.Row().style(equal_height=False):
D:\diffusion\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\metadata_editor.py:521: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  cover_image = gr.Image(
D:\diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\main.py:218: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  with gr.Row().style(equal_height=False):
D:\diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\tag_editor_ui\block_dataset_gallery.py:25: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  self.gl_dataset_images = gr.Gallery(label='Dataset Images', elem_id="dataset_tag_editor_dataset_gallery").style(grid=image_columns)
D:\diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\tag_editor_ui\block_dataset_gallery.py:25: GradioDeprecationWarning: The 'grid' parameter will be deprecated. Please use 'columns' in the constructor instead.
  self.gl_dataset_images = gr.Gallery(label='Dataset Images', elem_id="dataset_tag_editor_dataset_gallery").style(grid=image_columns)
D:\diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\tag_editor_ui\tab_filter_by_selection.py:35: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  self.gl_filter_images = gr.Gallery(label='Filter Images', elem_id="dataset_tag_editor_filter_gallery").style(grid=image_columns)
D:\diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\tag_editor_ui\tab_filter_by_selection.py:35: GradioDeprecationWarning: The 'grid' parameter will be deprecated. Please use 'columns' in the constructor instead.
  self.gl_filter_images = gr.Gallery(label='Filter Images', elem_id="dataset_tag_editor_filter_gallery").style(grid=image_columns)
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Creating model from config: D:\diffusion\stable-diffusion-webui\configs\v1-inference.yaml
*** Error executing callback app_started_callback for D:\diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\api.py
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\script_callbacks.py", line 139, in app_started_callback
        c.callback(demo, app)
      File "D:\diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\api.py", line 60, in controlnet_api
        controlnet_input_images: List[str] = Body([], title='Controlnet Input Images'),
    NameError: name 'List' is not defined

---
Civitai Link: Connecting to Civitai Link Server
Civitai Link: Connected to Civitai Link Server
Startup time: 18.0s (prepare environment: 5.4s, import torch: 3.1s, import gradio: 1.0s, setup paths: 0.7s, initialize shared: 0.2s, other imports: 0.5s, setup codeformer: 0.1s, list SD models: 0.5s, load scripts: 3.4s, scripts before_ui_callback: 0.3s, create ui: 0.7s, gradio launch: 0.7s, app_started_callback: 1.1s).
Civitai Link: Joined room 77a5fdccada8c93d93f2ce5388cd93b71a0df3e4fb072ee69b43dbc3530000dda9a0896c20f0b3ba492319626cc39196c19a61b1998d7ef37998c9e1e5fac07a
Civitai Link: Presence update: SD: 1, Clients: 0
Loading VAE weights specified in settings: D:\diffusion\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: Doggettx... done.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
1001
1001
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Launching Web UI with arguments: --opt-sdp-attention --opt-split-attention --opt-sub-quad-attention --no-half-vae
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 1.13.1+cu117 with CUDA 1107 (you have 2.0.0+cu118)
    Python  3.10.9 (you have 3.10.10)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
No module 'xformers'. Proceeding without it.
Loading weights [1a189f0be6] from D:\diffusion\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 10.5s (prepare environment: 2.1s, import torch: 3.3s, import gradio: 1.0s, setup paths: 0.7s, initialize shared: 0.2s, other imports: 0.5s, setup codeformer: 0.1s, list SD models: 0.6s, load scripts: 1.1s, create ui: 0.5s, gradio launch: 0.3s).
Creating model from config: D:\diffusion\stable-diffusion-webui\configs\v1-inference.yaml
Loading VAE weights specified in settings: D:\diffusion\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: Doggettx... done.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
Model loaded in 85.5s (load weights from disk: 1.1s, create model: 0.6s, apply weights to model: 2.4s, load VAE: 0.2s, load textual inversion embeddings: 80.5s, calculate empty prompt: 0.7s).
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
*** Error loading embedding 2f5c1ce7cc661d69e29f3e9e0aeee078.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
*** Error loading embedding dilara_final.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
*** Error loading embedding Judy-10.safetensors
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "D:\diffusion\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 "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
Training at rate of 0.004 until step 150
Preparing dataset...
  0%|                                                                                           | 0/30 [00:00<?, ?it/s]No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
No Image data blocks found.
  3%|██▊                                                                                | 1/30 [00:02<01:10,  2.45s/it]No Image data blocks found.
 10%|████████▎                                                                          | 3/30 [00:03<00:23,  1.17it/s]No Image data blocks found.
 17%|█████████████▊                                                                     | 5/30 [00:03<00:14,  1.77it/s]No Image data blocks found.
 23%|███████████████████▎                                                               | 7/30 [00:04<00:10,  2.22it/s]No Image data blocks found.
 30%|████████████████████████▉                                                          | 9/30 [00:04<00:08,  2.55it/s]No Image data blocks found.
 37%|██████████████████████████████                                                    | 11/30 [00:05<00:06,  2.80it/s]No Image data blocks found.
 43%|███████████████████████████████████▌                                              | 13/30 [00:05<00:05,  2.97it/s]No Image data blocks found.
 50%|█████████████████████████████████████████                                         | 15/30 [00:06<00:04,  3.13it/s]No Image data blocks found.
 57%|██████████████████████████████████████████████▍                                   | 17/30 [00:07<00:04,  3.19it/s]No Image data blocks found.
 63%|███████████████████████████████████████████████████▉                              | 19/30 [00:07<00:03,  3.26it/s]No Image data blocks found.
 70%|█████████████████████████████████████████████████████████▍                        | 21/30 [00:08<00:02,  3.31it/s]No Image data blocks found.
 77%|██████████████████████████████████████████████████████████████▊                   | 23/30 [00:08<00:02,  3.32it/s]No Image data blocks found.
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:09<00:00,  3.28it/s]
  0%|                                                                                          | 0/150 [00:00<?, ?it/s]*** Error training embedding
    Traceback (most recent call last):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 515, in train_embedding
        scheduler.apply(optimizer, embedding.step)
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\learn_schedule.py", line 73, in apply
        if not self.step(step_number):
      File "D:\diffusion\stable-diffusion-webui\modules\textual_inversion\learn_schedule.py", line 62, in step
        if step_number < self.end_step:
    TypeError: '<' not supported between instances of 'NoneType' and 'int'

---
Applying attention optimization: Doggettx... done.
```


### Additional information

I did some debugging and it appears that embedding.step in textual_inversion.py:515 is `None`
<img width="957" alt="image" src="https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/831633/20dcb025-04f3-49d2-a69d-6c911a72ef08">