Repository: stable-diffusion-webui
Issue: When using only Waifu Diffusion I get a tensor error.
Labels: bug-report,platform:mac

### Is there an existing issue for this?

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

### What happened?

I use Waifu Diffusion, and I get an error message. I think it might have something to do with Lora models being present, even though none of them are being used.

### Steps to reproduce the problem

1. Type in prompt
2. Hit Generate


### What should have happened?

An image being generated.

### Commit where the problem happens

22bcc7b

### 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 COMMANDLINE_ARGS=--theme=dark --medvram --no-half --xformers
CUDA_LAUNCH_BLOCKING=1
```


### List of extensions

StylePile
a1111-sd-webui-lycoris
a1111-sd-webui-tagcomplete
booru2prompt
embedding-inspector
kohya_ss
model-keyword
sd-dynamic-prompts
sd-webui-additional-networks
sd-webui-gelbooru-prompt
sd-webui-model-converter
sd-webui-supermerger
sd_dreambooth_extension
stable-diffusion-webui-Prompt_Generator
stable-diffusion-webui-composable-lora
stable-diffusion-webui-dumpunet
stable-diffusion-webui-randomize
stable-diffusion-webui-text2prompt
stable-diffusion-webui-tokenizer
stable-diffusion-webui-visualize-cross-attention-extension
stable-diffusion-webui-wd14-tagger

### Console logs

```Shell
'CUDA_LAUNCH_BLOCKING' is not recognized as an internal or external command,
operable program or batch file.
fatal: not a git repository (or any of the parent directories): .git
venv "S:\WaifuDiffusion\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: <none>
Installing requirements for Web UI
Installing sd-dynamic-prompts requirements.txt

Installing scikit-learn

Error running install.py for extension S:\WaifuDiffusion\extensions\sd_dreambooth_extension.
Command: "S:\WaifuDiffusion\venv\Scripts\python.exe" "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\install.py"
Error code: 1
stdout: Ignoring tensorflow-macos: markers 'sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
Collecting accelerate==0.16.0
  Using cached accelerate-0.16.0-py3-none-any.whl (199 kB)
Collecting albumentations~=1.3.0
  Using cached albumentations-1.3.0-py3-none-any.whl (123 kB)
Collecting bitsandbytes==0.35.4
  Using cached bitsandbytes-0.35.4-py3-none-any.whl (62.5 MB)
Collecting diffusers==0.13.1
  Using cached diffusers-0.13.1-py3-none-any.whl (716 kB)
Collecting gitpython~=3.1.31
  Using cached GitPython-3.1.31-py3-none-any.whl (184 kB)
Requirement already satisfied: fastapi in s:\waifudiffusion\venv\lib\site-packages (from -r S:\WaifuDiffusion\extensions\sd_dreambooth_extension\requirements.txt (line 6)) (0.94.0)
Requirement already satisfied: ftfy~=6.1.1 in s:\waifudiffusion\venv\lib\site-packages (from -r S:\WaifuDiffusion\extensions\sd_dreambooth_extension\requirements.txt (line 7)) (6.1.1)
Collecting modelcards~=0.1.6
  Using cached modelcards-0.1.6-py3-none-any.whl (12 kB)
Collecting tensorboard
  Using cached tensorboard-2.12.1-py3-none-any.whl (5.6 MB)
Collecting tensorflow==2.11.0
  Using cached tensorflow-2.11.0-cp310-cp310-win_amd64.whl (1.9 kB)
Collecting tqdm~=4.64.1
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting transformers~=4.26.1
  Using cached transformers-4.26.1-py3-none-any.whl (6.3 MB)
Collecting discord-webhook~=1.1.0
  Using cached discord_webhook-1.1.0-py3-none-any.whl (12 kB)
Collecting lion-pytorch~=0.0.7
  Using cached lion_pytorch-0.0.7-py3-none-any.whl (4.3 kB)

#######################################################################################################
Initializing Dreambooth
If submitting an issue on github, please provide the below text for debugging purposes:

Python revision: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Dreambooth revision: d4e2f7d5dc5c67cc6292c8b8137b688a43247c35
SD-WebUI revision:

Checking Dreambooth requirements...

stderr: ERROR: Could not find a version that satisfies the requirement xformers==0.0.17.dev464 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.16rc424, 0.0.16rc425, 0.0.16, 0.0.17rc481, 0.0.17rc482, 0.0.17, 0.0.18.dev500, 0.0.18.dev501, 0.0.18.dev502, 0.0.18.dev503, 0.0.18.dev504, 0.0.18)
ERROR: No matching distribution found for xformers==0.0.17.dev464

[notice] A new release of pip available: 22.2.1 -> 23.0.1
[notice] To update, run: S:\WaifuDiffusion\venv\Scripts\python.exe -m pip install --upgrade pip
Traceback (most recent call last):
  File "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\install.py", line 6, in <module>
    actual_install()
  File "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\postinstall.py", line 285, in actual_install
    run(f'"{sys.executable}" -m pip install -r "{req_file}"', f"Checking {name} requirements...",
  File "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\postinstall.py", line 22, in run
    raise RuntimeError(
RuntimeError: Couldn't install Dreambooth requirements.. Command: "S:\WaifuDiffusion\venv\Scripts\python.exe" -m pip install -r "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\requirements.txt" Error code: 1



Launching Web UI with arguments: --theme=dark --medvram --no-half --xformers
Loading booru2prompt settings
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████████| 22/22 [00:00<00:00, 43940.33it/s]
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████████| 22/22 [00:00<00:00, 43982.22it/s]
Script path is S:\WaifuDiffusion
Error loading script: main.py
Traceback (most recent call last):
  File "S:\WaifuDiffusion\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "S:\WaifuDiffusion\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\scripts\main.py", line 17, in <module>
    from extensions.sd_dreambooth_extension.dreambooth.webhook import save_and_test_webhook
  File "S:\WaifuDiffusion\extensions\sd_dreambooth_extension\dreambooth\webhook.py", line 6, in <module>
    import discord_webhook
ModuleNotFoundError: No module named 'discord_webhook'

[text2prompt] Following databases are available:
    all-mpnet-base-v2 : danbooru_strict
Loading weights [e8f4b2225b] from S:\WaifuDiffusion\models\Stable-diffusion\Waifu Diffusion.ckpt
Creating model from config: S:\WaifuDiffusion\repositories\stable-diffusion-stability-ai\configs\stable-diffusion\v2-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 865.91 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Textual inversion embeddings skipped(1): konataredux-10000
Model loaded in 3.7s (load weights from disk: 1.4s, find config: 0.7s, create model: 0.1s, apply weights to model: 0.4s, move model to device: 0.4s, load textual inversion embeddings: 0.7s).
Error executing callback ui_tabs_callback for S:\WaifuDiffusion\extensions\sd-webui-model-converter\scripts\convert.py
Traceback (most recent call last):
  File "S:\WaifuDiffusion\modules\script_callbacks.py", line 125, in ui_tabs_callback
    res += c.callback() or []
  File "S:\WaifuDiffusion\extensions\sd-webui-model-converter\scripts\convert.py", line 94, in add_tab
    model_converter_convert.click(
  File "S:\WaifuDiffusion\venv\lib\site-packages\gradio\events.py", line 129, in __call__
    dep, dep_index = self.trigger.set_event_trigger(
  File "S:\WaifuDiffusion\venv\lib\site-packages\gradio\blocks.py", line 195, in set_event_trigger
    check_function_inputs_match(fn, inputs, inputs_as_dict)
  File "S:\WaifuDiffusion\venv\lib\site-packages\gradio\utils.py", line 940, in check_function_inputs_match
    if not is_special_typed_parameter(name):
  File "S:\WaifuDiffusion\venv\lib\site-packages\gradio\utils.py", line 929, in is_special_typed_parameter
    is_event_data = issubclass(parameter_types.get(name, int), EventData)
TypeError: issubclass() arg 1 must be a class

[text2prompt] Loading database with name "all-mpnet-base-v2 : danbooru_strict"...
[text2prompt] Database loaded
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 12.1s (import torch: 0.9s, import gradio: 0.6s, import ldm: 0.4s, other imports: 0.6s, setup codeformer: 0.1s, load scripts: 1.1s, load SD checkpoint: 4.0s, create ui: 4.3s).
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
Error completing request
Arguments: ('task(lgitk5b7gblwjz2)', '1girl', '', [], 5, 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, True, 'keyword prompt', 'keyword1, keyword2', 'None', 'textual inversion first', 'None', '0.7', 'None', True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7, False, False, True, False, False, 0, 'Gustavosta/MagicPrompt-Stable-Diffusion', '', False, False, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', None, '', 'Get Tags', False, False, False, False, '', '', '', '', '', '', '', '', '', '', '', '', '', False, False, 'positive', 'comma', 0, False, False, '', 1, '', 0, '', 0, '', True, False, False, False, 0, 'Not set', True, True, '', '', '', '', '', 1.3, 'Not set', 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', False, 'None', False, '', '', 'disable', 'Custom', 'HSL', 'abs(v)', 'abs(v)', 'abs(v)', '(2+v)/3', '1.0', '0.5', 'Auto [0,1]', -1, 1, 1, 0, False, '', False, '', '', 'disable', [], 'Custom', 'HSL', 'abs(v)', 'abs(v)', 'abs(v)', '(2+v)/3', '1.0', '0.5', 'Auto [0,1]', -1, 1, 1, 0, False, '', False, False, '', '', 'disable', 'Custom', 'HSL', 'abs(v)', 'abs(v)', 'abs(v)', '(2+v)/3', '1.0', '0.5', 'Auto [0,1]', -1, 1, 1, 0, False, '', False) {}
Traceback (most recent call last):
  File "S:\WaifuDiffusion\modules\call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "S:\WaifuDiffusion\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "S:\WaifuDiffusion\modules\txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "S:\WaifuDiffusion\modules\processing.py", line 503, in process_images
    res = process_images_inner(p)
  File "S:\WaifuDiffusion\modules\processing.py", line 642, in process_images_inner
    uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps, cached_uc)
  File "S:\WaifuDiffusion\modules\processing.py", line 587, in get_conds_with_caching
    cache[1] = function(shared.sd_model, required_prompts, steps)
  File "S:\WaifuDiffusion\modules\prompt_parser.py", line 140, in get_learned_conditioning
    conds = model.get_learned_conditioning(texts)
  File "S:\WaifuDiffusion\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 669, in get_learned_conditioning
    c = self.cond_stage_model(c)
  File "S:\WaifuDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "S:\WaifuDiffusion\modules\sd_hijack_clip.py", line 229, in forward
    z = self.process_tokens(tokens, multipliers)
  File "S:\WaifuDiffusion\modules\sd_hijack_clip.py", line 254, in process_tokens
    z = self.encode_with_transformers(tokens)
  File "S:\WaifuDiffusion\modules\sd_hijack_open_clip.py", line 28, in encode_with_transformers
    z = self.wrapped.encode_with_transformer(tokens)
  File "S:\WaifuDiffusion\repositories\stable-diffusion-stability-ai\ldm\modules\encoders\modules.py", line 220, in encode_with_transformer
    x = self.text_transformer_forward(x, attn_mask=self.model.attn_mask)
  File "S:\WaifuDiffusion\repositories\stable-diffusion-stability-ai\ldm\modules\encoders\modules.py", line 232, in text_transformer_forward
    x = r(x, attn_mask=attn_mask)
  File "S:\WaifuDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "S:\WaifuDiffusion\venv\lib\site-packages\open_clip\transformer.py", line 154, in forward
    x = x + self.ls_1(self.attention(self.ln_1(x), attn_mask=attn_mask))
  File "S:\WaifuDiffusion\venv\lib\site-packages\open_clip\transformer.py", line 151, in attention
    return self.attn(x, x, x, need_weights=False, attn_mask=attn_mask)[0]
  File "S:\WaifuDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "S:\WaifuDiffusion\extensions\a1111-sd-webui-lycoris\..\..\extensions-builtin/Lora\lora.py", line 329, in lora_MultiheadAttention_forward
    lora_apply_weights(self)
  File "S:\WaifuDiffusion\extensions\a1111-sd-webui-lycoris\..\..\extensions-builtin/Lora\lora.py", line 287, in lora_apply_weights
    self.in_proj_weight += updown_qkv
RuntimeError: The size of tensor a (1024) must match the size of tensor b (768) at non-singleton dimension 1
```


### Additional information

Haven't tried a fresh install without any additional models/extensions, but if necessary, I will try.