Repository: stable-diffusion-webui
Issue: [Bug]: Create Embedding throws error
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
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Create Embedding does not work it simply throws an error, i saw someone else having this problem too, but their error was different. 

### Steps to reproduce the problem

1. Go to train
2. Click on create embedding
3. See error

### What should have happened?

Have created a new embedding

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

Microsoft Edge

### Sysinfo

[sysinfo-2024-02-09-17-03.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/14224376/sysinfo-2024-02-09-17-03.json)


### Console logs

```Shell
Already up to date.
venv "C:\StableDiffusion\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)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Installing requirements for diffusers
Launching Web UI with arguments: --xformers --theme dark --autolaunch --no-half --precision full
Style database not found: C:\StableDiffusion\stable-diffusion-webui\styles.csv
ControlNet preprocessor location: C:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-02-09 18:04:38,920 - ControlNet - INFO - ControlNet v1.1.440
2024-02-09 18:04:38,981 - ControlNet - INFO - ControlNet v1.1.440
Loading weights [e6bb9ea85b] from C:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion\sd_xl_base_1.0_0.9vae.safetensors
2024-02-09 18:04:39,149 - ControlNet - INFO - ControlNet UI callback registered.
2024-02-09 18:04:39,632 - modelscope - INFO - PyTorch version 2.0.1+cu118 Found.
2024-02-09 18:04:39,632 - modelscope - INFO - Loading ast index from C:\Users\rouve\.cache\modelscope\ast_indexer
Creating model from config: C:\StableDiffusion\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
2024-02-09 18:04:40,018 - modelscope - INFO - Loading done! Current index file version is 1.12.0, with md5 05f7bfa6becfe775de58954cff640d4f and a total number of 964 components indexed
C:\StableDiffusion\stable-diffusion-webui\extensions\facechain\app.py:1276: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  output_images = gr.Gallery(label='Output', show_label=False).style(columns=3, rows=2, height=600,
[['C:\\StableDiffusion\\stable-diffusion-webui\\extensions\\facechain/resources/inpaint_template\\1.jpg'], ['C:\\StableDiffusion\\stable-diffusion-webui\\extensions\\facechain/resources/inpaint_template\\2.jpg'], ['C:\\StableDiffusion\\stable-diffusion-webui\\extensions\\facechain/resources/inpaint_template\\3.jpg'], ['C:\\StableDiffusion\\stable-diffusion-webui\\extensions\\facechain/resources/inpaint_template\\4.jpg'], ['C:\\StableDiffusion\\stable-diffusion-webui\\extensions\\facechain/resources/inpaint_template\\5.jpg']]
C:\StableDiffusion\stable-diffusion-webui\extensions\facechain\app.py:1379: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  output_images = gr.Gallery(
[]
C:\StableDiffusion\stable-diffusion-webui\extensions\facechain\app.py:1530: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  output_images = gr.Gallery(
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 11.4s (prepare environment: 3.2s, import torch: 2.0s, import gradio: 0.7s, setup paths: 0.6s, initialize shared: 0.2s, other imports: 0.4s, setup codeformer: 0.2s, load scripts: 0.8s, create ui: 3.4s, gradio launch: 0.1s).
Applying attention optimization: xformers... done.
Model loaded in 4.3s (load weights from disk: 0.8s, create model: 0.4s, apply weights to model: 2.3s, apply float(): 0.1s, move model to device: 0.2s, load textual inversion embeddings: 0.4s).
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
Traceback (most recent call last):
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\StableDiffusion\stable-diffusion-webui\modules\textual_inversion\ui.py", line 10, in create_embedding
    filename = modules.textual_inversion.textual_inversion.create_embedding(name, nvpt, overwrite_old, init_text=initialization_text)
  File "C:\StableDiffusion\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 259, in create_embedding
    cond_model([""])  # will send cond model to GPU if lowvram/medvram is active
  File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "C:\StableDiffusion\stable-diffusion-webui\repositories\generative-models\sgm\modules\encoders\modules.py", line 141, in forward
    emb_out = embedder(batch[embedder.input_key])
TypeError: list indices must be integers or slices, not str
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/api/predict "HTTP/1.1 500 Internal Server Error"
INFO:httpx:HTTP Request: POST http://127.0.0.1:7860/reset "HTTP/1.1 200 OK"
```


### Additional information

_No response_