bmaltais / kohya_ss

Apache License 2.0
9.62k stars 1.24k forks source link

Trained model in Lora does not work, either with the trained model, or any model. #620

Closed Deejay85 closed 9 months ago

Deejay85 commented 1 year ago

Him I did a quick two-hour test using my Tesla M40, but when I try to generate an image, I get the following message whenever I try to use the model.

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

#######################################################################################################
Initializing Civitai Link
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)]
Civitai Link revision: c4d4b2e374eccb5f192929a1332e46852f494173
SD-WebUI revision:

Checking Civitai Link requirements...
[!] python-socketio[client] version 5.7.2 NOT installed.

#######################################################################################################

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.2-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.dev501, 0.0.18.dev502, 0.0.18.dev503, 0.0.18.dev504, 0.0.18, 0.0.19.dev505, 0.0.19.dev516)
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 --xformers
Loading booru2prompt settings
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████████| 22/22 [00:00<00:00, 21996.35it/s]
[AddNet] Updating model hashes...
100%|██████████████████████████████████████████████████████████████████████████████████████████| 22/22 [00:00<?, ?it/s]
Civitai: API loaded
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 [01a4c64a52] from S:\WaifuDiffusion\models\Stable-diffusion\HD-22-fp32.safetensors
Creating model from config: S:\WaifuDiffusion\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(1): konataredux-10000
Model loaded in 1.5s (load weights from disk: 0.3s, create model: 0.3s, apply weights to model: 0.5s, apply half(): 0.4s).
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()`.
Civitai: Check resources for missing preview images
Startup time: 10.8s (import torch: 1.0s, import gradio: 0.7s, import ldm: 0.4s, other imports: 0.6s, load scripts: 1.5s, load SD checkpoint: 1.7s, create ui: 4.7s, gradio launch: 0.1s).
Civitai: Found 9 resources missing preview images
Civitai: Failed to fetch preview images from Civitai
Failed to match keys when loading Lora S:\WaifuDiffusion\models\Lora\hugeballs.safetensors: {'lora_te_text_model_encoder_layers_12_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_12_mlp_fc1', 'lora_te_text_model_encoder_layers_12_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_12_mlp_fc1', 'lora_te_text_model_encoder_layers_12_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_12_mlp_fc1', 'lora_te_text_model_encoder_layers_12_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_12_mlp_fc2', 'lora_te_text_model_encoder_layers_12_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_12_mlp_fc2', 'lora_te_text_model_encoder_layers_12_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_12_mlp_fc2', 'lora_te_text_model_encoder_layers_12_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_12_self_attn_k_proj', 'lora_te_text_model_encoder_layers_12_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_12_self_attn_k_proj', 'lora_te_text_model_encoder_layers_12_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_12_self_attn_k_proj', 'lora_te_text_model_encoder_layers_12_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_12_self_attn_out_proj', 'lora_te_text_model_encoder_layers_12_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_12_self_attn_out_proj', 'lora_te_text_model_encoder_layers_12_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_12_self_attn_out_proj', 'lora_te_text_model_encoder_layers_12_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_12_self_attn_q_proj', 'lora_te_text_model_encoder_layers_12_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_12_self_attn_q_proj', 'lora_te_text_model_encoder_layers_12_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_12_self_attn_q_proj', 'lora_te_text_model_encoder_layers_12_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_12_self_attn_v_proj', 'lora_te_text_model_encoder_layers_12_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_12_self_attn_v_proj', 'lora_te_text_model_encoder_layers_12_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_12_self_attn_v_proj', 'lora_te_text_model_encoder_layers_13_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_13_mlp_fc1', 'lora_te_text_model_encoder_layers_13_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_13_mlp_fc1', 'lora_te_text_model_encoder_layers_13_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_13_mlp_fc1', 'lora_te_text_model_encoder_layers_13_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_13_mlp_fc2', 'lora_te_text_model_encoder_layers_13_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_13_mlp_fc2', 'lora_te_text_model_encoder_layers_13_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_13_mlp_fc2', 'lora_te_text_model_encoder_layers_13_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_13_self_attn_k_proj', 'lora_te_text_model_encoder_layers_13_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_13_self_attn_k_proj', 'lora_te_text_model_encoder_layers_13_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_13_self_attn_k_proj', 'lora_te_text_model_encoder_layers_13_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_13_self_attn_out_proj', 'lora_te_text_model_encoder_layers_13_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_13_self_attn_out_proj', 'lora_te_text_model_encoder_layers_13_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_13_self_attn_out_proj', 'lora_te_text_model_encoder_layers_13_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_13_self_attn_q_proj', 'lora_te_text_model_encoder_layers_13_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_13_self_attn_q_proj', 'lora_te_text_model_encoder_layers_13_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_13_self_attn_q_proj', 'lora_te_text_model_encoder_layers_13_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_13_self_attn_v_proj', 'lora_te_text_model_encoder_layers_13_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_13_self_attn_v_proj', 'lora_te_text_model_encoder_layers_13_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_13_self_attn_v_proj', 'lora_te_text_model_encoder_layers_14_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_14_mlp_fc1', 'lora_te_text_model_encoder_layers_14_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_14_mlp_fc1', 'lora_te_text_model_encoder_layers_14_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_14_mlp_fc1', 'lora_te_text_model_encoder_layers_14_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_14_mlp_fc2', 'lora_te_text_model_encoder_layers_14_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_14_mlp_fc2', 'lora_te_text_model_encoder_layers_14_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_14_mlp_fc2', 'lora_te_text_model_encoder_layers_14_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_14_self_attn_k_proj', 'lora_te_text_model_encoder_layers_14_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_14_self_attn_k_proj', 'lora_te_text_model_encoder_layers_14_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_14_self_attn_k_proj', 'lora_te_text_model_encoder_layers_14_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_14_self_attn_out_proj', 'lora_te_text_model_encoder_layers_14_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_14_self_attn_out_proj', 'lora_te_text_model_encoder_layers_14_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_14_self_attn_out_proj', 'lora_te_text_model_encoder_layers_14_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_14_self_attn_q_proj', 'lora_te_text_model_encoder_layers_14_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_14_self_attn_q_proj', 'lora_te_text_model_encoder_layers_14_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_14_self_attn_q_proj', 'lora_te_text_model_encoder_layers_14_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_14_self_attn_v_proj', 'lora_te_text_model_encoder_layers_14_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_14_self_attn_v_proj', 'lora_te_text_model_encoder_layers_14_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_14_self_attn_v_proj', 'lora_te_text_model_encoder_layers_15_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_15_mlp_fc1', 'lora_te_text_model_encoder_layers_15_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_15_mlp_fc1', 'lora_te_text_model_encoder_layers_15_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_15_mlp_fc1', 'lora_te_text_model_encoder_layers_15_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_15_mlp_fc2', 'lora_te_text_model_encoder_layers_15_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_15_mlp_fc2', 'lora_te_text_model_encoder_layers_15_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_15_mlp_fc2', 'lora_te_text_model_encoder_layers_15_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_15_self_attn_k_proj', 'lora_te_text_model_encoder_layers_15_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_15_self_attn_k_proj', 'lora_te_text_model_encoder_layers_15_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_15_self_attn_k_proj', 'lora_te_text_model_encoder_layers_15_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_15_self_attn_out_proj', 'lora_te_text_model_encoder_layers_15_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_15_self_attn_out_proj', 'lora_te_text_model_encoder_layers_15_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_15_self_attn_out_proj', 'lora_te_text_model_encoder_layers_15_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_15_self_attn_q_proj', 'lora_te_text_model_encoder_layers_15_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_15_self_attn_q_proj', 'lora_te_text_model_encoder_layers_15_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_15_self_attn_q_proj', 'lora_te_text_model_encoder_layers_15_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_15_self_attn_v_proj', 'lora_te_text_model_encoder_layers_15_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_15_self_attn_v_proj', 'lora_te_text_model_encoder_layers_15_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_15_self_attn_v_proj', 'lora_te_text_model_encoder_layers_16_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_16_mlp_fc1', 'lora_te_text_model_encoder_layers_16_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_16_mlp_fc1', 'lora_te_text_model_encoder_layers_16_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_16_mlp_fc1', 'lora_te_text_model_encoder_layers_16_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_16_mlp_fc2', 'lora_te_text_model_encoder_layers_16_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_16_mlp_fc2', 'lora_te_text_model_encoder_layers_16_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_16_mlp_fc2', 'lora_te_text_model_encoder_layers_16_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_16_self_attn_k_proj', 'lora_te_text_model_encoder_layers_16_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_16_self_attn_k_proj', 'lora_te_text_model_encoder_layers_16_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_16_self_attn_k_proj', 'lora_te_text_model_encoder_layers_16_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_16_self_attn_out_proj', 'lora_te_text_model_encoder_layers_16_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_16_self_attn_out_proj', 'lora_te_text_model_encoder_layers_16_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_16_self_attn_out_proj', 'lora_te_text_model_encoder_layers_16_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_16_self_attn_q_proj', 'lora_te_text_model_encoder_layers_16_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_16_self_attn_q_proj', 'lora_te_text_model_encoder_layers_16_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_16_self_attn_q_proj', 'lora_te_text_model_encoder_layers_16_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_16_self_attn_v_proj', 'lora_te_text_model_encoder_layers_16_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_16_self_attn_v_proj', 'lora_te_text_model_encoder_layers_16_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_16_self_attn_v_proj', 'lora_te_text_model_encoder_layers_17_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_17_mlp_fc1', 'lora_te_text_model_encoder_layers_17_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_17_mlp_fc1', 'lora_te_text_model_encoder_layers_17_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_17_mlp_fc1', 'lora_te_text_model_encoder_layers_17_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_17_mlp_fc2', 'lora_te_text_model_encoder_layers_17_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_17_mlp_fc2', 'lora_te_text_model_encoder_layers_17_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_17_mlp_fc2', 'lora_te_text_model_encoder_layers_17_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_17_self_attn_k_proj', 'lora_te_text_model_encoder_layers_17_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_17_self_attn_k_proj', 'lora_te_text_model_encoder_layers_17_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_17_self_attn_k_proj', 'lora_te_text_model_encoder_layers_17_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_17_self_attn_out_proj', 'lora_te_text_model_encoder_layers_17_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_17_self_attn_out_proj', 'lora_te_text_model_encoder_layers_17_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_17_self_attn_out_proj', 'lora_te_text_model_encoder_layers_17_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_17_self_attn_q_proj', 'lora_te_text_model_encoder_layers_17_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_17_self_attn_q_proj', 'lora_te_text_model_encoder_layers_17_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_17_self_attn_q_proj', 'lora_te_text_model_encoder_layers_17_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_17_self_attn_v_proj', 'lora_te_text_model_encoder_layers_17_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_17_self_attn_v_proj', 'lora_te_text_model_encoder_layers_17_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_17_self_attn_v_proj', 'lora_te_text_model_encoder_layers_18_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_18_mlp_fc1', 'lora_te_text_model_encoder_layers_18_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_18_mlp_fc1', 'lora_te_text_model_encoder_layers_18_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_18_mlp_fc1', 'lora_te_text_model_encoder_layers_18_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_18_mlp_fc2', 'lora_te_text_model_encoder_layers_18_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_18_mlp_fc2', 'lora_te_text_model_encoder_layers_18_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_18_mlp_fc2', 'lora_te_text_model_encoder_layers_18_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_18_self_attn_k_proj', 'lora_te_text_model_encoder_layers_18_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_18_self_attn_k_proj', 'lora_te_text_model_encoder_layers_18_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_18_self_attn_k_proj', 'lora_te_text_model_encoder_layers_18_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_18_self_attn_out_proj', 'lora_te_text_model_encoder_layers_18_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_18_self_attn_out_proj', 'lora_te_text_model_encoder_layers_18_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_18_self_attn_out_proj', 'lora_te_text_model_encoder_layers_18_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_18_self_attn_q_proj', 'lora_te_text_model_encoder_layers_18_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_18_self_attn_q_proj', 'lora_te_text_model_encoder_layers_18_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_18_self_attn_q_proj', 'lora_te_text_model_encoder_layers_18_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_18_self_attn_v_proj', 'lora_te_text_model_encoder_layers_18_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_18_self_attn_v_proj', 'lora_te_text_model_encoder_layers_18_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_18_self_attn_v_proj', 'lora_te_text_model_encoder_layers_19_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_19_mlp_fc1', 'lora_te_text_model_encoder_layers_19_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_19_mlp_fc1', 'lora_te_text_model_encoder_layers_19_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_19_mlp_fc1', 'lora_te_text_model_encoder_layers_19_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_19_mlp_fc2', 'lora_te_text_model_encoder_layers_19_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_19_mlp_fc2', 'lora_te_text_model_encoder_layers_19_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_19_mlp_fc2', 'lora_te_text_model_encoder_layers_19_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_19_self_attn_k_proj', 'lora_te_text_model_encoder_layers_19_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_19_self_attn_k_proj', 'lora_te_text_model_encoder_layers_19_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_19_self_attn_k_proj', 'lora_te_text_model_encoder_layers_19_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_19_self_attn_out_proj', 'lora_te_text_model_encoder_layers_19_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_19_self_attn_out_proj', 'lora_te_text_model_encoder_layers_19_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_19_self_attn_out_proj', 'lora_te_text_model_encoder_layers_19_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_19_self_attn_q_proj', 'lora_te_text_model_encoder_layers_19_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_19_self_attn_q_proj', 'lora_te_text_model_encoder_layers_19_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_19_self_attn_q_proj', 'lora_te_text_model_encoder_layers_19_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_19_self_attn_v_proj', 'lora_te_text_model_encoder_layers_19_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_19_self_attn_v_proj', 'lora_te_text_model_encoder_layers_19_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_19_self_attn_v_proj', 'lora_te_text_model_encoder_layers_20_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_20_mlp_fc1', 'lora_te_text_model_encoder_layers_20_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_20_mlp_fc1', 'lora_te_text_model_encoder_layers_20_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_20_mlp_fc1', 'lora_te_text_model_encoder_layers_20_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_20_mlp_fc2', 'lora_te_text_model_encoder_layers_20_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_20_mlp_fc2', 'lora_te_text_model_encoder_layers_20_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_20_mlp_fc2', 'lora_te_text_model_encoder_layers_20_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_20_self_attn_k_proj', 'lora_te_text_model_encoder_layers_20_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_20_self_attn_k_proj', 'lora_te_text_model_encoder_layers_20_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_20_self_attn_k_proj', 'lora_te_text_model_encoder_layers_20_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_20_self_attn_out_proj', 'lora_te_text_model_encoder_layers_20_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_20_self_attn_out_proj', 'lora_te_text_model_encoder_layers_20_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_20_self_attn_out_proj', 'lora_te_text_model_encoder_layers_20_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_20_self_attn_q_proj', 'lora_te_text_model_encoder_layers_20_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_20_self_attn_q_proj', 'lora_te_text_model_encoder_layers_20_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_20_self_attn_q_proj', 'lora_te_text_model_encoder_layers_20_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_20_self_attn_v_proj', 'lora_te_text_model_encoder_layers_20_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_20_self_attn_v_proj', 'lora_te_text_model_encoder_layers_20_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_20_self_attn_v_proj', 'lora_te_text_model_encoder_layers_21_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_21_mlp_fc1', 'lora_te_text_model_encoder_layers_21_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_21_mlp_fc1', 'lora_te_text_model_encoder_layers_21_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_21_mlp_fc1', 'lora_te_text_model_encoder_layers_21_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_21_mlp_fc2', 'lora_te_text_model_encoder_layers_21_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_21_mlp_fc2', 'lora_te_text_model_encoder_layers_21_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_21_mlp_fc2', 'lora_te_text_model_encoder_layers_21_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_21_self_attn_k_proj', 'lora_te_text_model_encoder_layers_21_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_21_self_attn_k_proj', 'lora_te_text_model_encoder_layers_21_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_21_self_attn_k_proj', 'lora_te_text_model_encoder_layers_21_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_21_self_attn_out_proj', 'lora_te_text_model_encoder_layers_21_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_21_self_attn_out_proj', 'lora_te_text_model_encoder_layers_21_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_21_self_attn_out_proj', 'lora_te_text_model_encoder_layers_21_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_21_self_attn_q_proj', 'lora_te_text_model_encoder_layers_21_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_21_self_attn_q_proj', 'lora_te_text_model_encoder_layers_21_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_21_self_attn_q_proj', 'lora_te_text_model_encoder_layers_21_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_21_self_attn_v_proj', 'lora_te_text_model_encoder_layers_21_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_21_self_attn_v_proj', 'lora_te_text_model_encoder_layers_21_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_21_self_attn_v_proj', 'lora_te_text_model_encoder_layers_22_mlp_fc1.alpha': 'transformer_text_model_encoder_layers_22_mlp_fc1', 'lora_te_text_model_encoder_layers_22_mlp_fc1.lora_down.weight': 'transformer_text_model_encoder_layers_22_mlp_fc1', 'lora_te_text_model_encoder_layers_22_mlp_fc1.lora_up.weight': 'transformer_text_model_encoder_layers_22_mlp_fc1', 'lora_te_text_model_encoder_layers_22_mlp_fc2.alpha': 'transformer_text_model_encoder_layers_22_mlp_fc2', 'lora_te_text_model_encoder_layers_22_mlp_fc2.lora_down.weight': 'transformer_text_model_encoder_layers_22_mlp_fc2', 'lora_te_text_model_encoder_layers_22_mlp_fc2.lora_up.weight': 'transformer_text_model_encoder_layers_22_mlp_fc2', 'lora_te_text_model_encoder_layers_22_self_attn_k_proj.alpha': 'transformer_text_model_encoder_layers_22_self_attn_k_proj', 'lora_te_text_model_encoder_layers_22_self_attn_k_proj.lora_down.weight': 'transformer_text_model_encoder_layers_22_self_attn_k_proj', 'lora_te_text_model_encoder_layers_22_self_attn_k_proj.lora_up.weight': 'transformer_text_model_encoder_layers_22_self_attn_k_proj', 'lora_te_text_model_encoder_layers_22_self_attn_out_proj.alpha': 'transformer_text_model_encoder_layers_22_self_attn_out_proj', 'lora_te_text_model_encoder_layers_22_self_attn_out_proj.lora_down.weight': 'transformer_text_model_encoder_layers_22_self_attn_out_proj', 'lora_te_text_model_encoder_layers_22_self_attn_out_proj.lora_up.weight': 'transformer_text_model_encoder_layers_22_self_attn_out_proj', 'lora_te_text_model_encoder_layers_22_self_attn_q_proj.alpha': 'transformer_text_model_encoder_layers_22_self_attn_q_proj', 'lora_te_text_model_encoder_layers_22_self_attn_q_proj.lora_down.weight': 'transformer_text_model_encoder_layers_22_self_attn_q_proj', 'lora_te_text_model_encoder_layers_22_self_attn_q_proj.lora_up.weight': 'transformer_text_model_encoder_layers_22_self_attn_q_proj', 'lora_te_text_model_encoder_layers_22_self_attn_v_proj.alpha': 'transformer_text_model_encoder_layers_22_self_attn_v_proj', 'lora_te_text_model_encoder_layers_22_self_attn_v_proj.lora_down.weight': 'transformer_text_model_encoder_layers_22_self_attn_v_proj', 'lora_te_text_model_encoder_layers_22_self_attn_v_proj.lora_up.weight': 'transformer_text_model_encoder_layers_22_self_attn_v_proj'}
Error completing request
Arguments: ('task(4797vjtkjrv80t9)', 'futanari <lora:hugeballs:1>,', '', [], 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, 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_clip.py", line 302, in encode_with_transformers
    outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-opts.CLIP_stop_at_last_layers)
  File "S:\WaifuDiffusion\venv\lib\site-packages\torch\nn\modules\module.py", line 1212, in _call_impl
    result = forward_call(*input, **kwargs)
  File "S:\WaifuDiffusion\venv\lib\site-packages\transformers\models\clip\modeling_clip.py", line 811, in forward
    return self.text_model(
  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\transformers\models\clip\modeling_clip.py", line 721, in forward
    encoder_outputs = self.encoder(
  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\transformers\models\clip\modeling_clip.py", line 650, in forward
    layer_outputs = encoder_layer(
  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\transformers\models\clip\modeling_clip.py", line 379, in forward
    hidden_states, attn_weights = self.self_attn(
  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\transformers\models\clip\modeling_clip.py", line 268, in forward
    query_states = self.q_proj(hidden_states) * self.scale
  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 305, in lora_Linear_forward
    lora_apply_weights(self)
  File "S:\WaifuDiffusion\extensions\a1111-sd-webui-lycoris\..\..\extensions-builtin/Lora\lora.py", line 273, in lora_apply_weights
    self.weight += lora_calc_updown(lora, module, self.weight)
RuntimeError: The size of tensor a (768) must match the size of tensor b (1024) at non-singleton dimension 1

Also, as a test, I tried to generate an image without using the Lora image, and it ran just fine, so it's not the model itself, or some kind of system setting.

I am of course using Automatic1111, make sure all the correct extensions were installed (did a word search for the terms "Lora," "Dreambooth," and "kohya_ss" just to be safe), and even used other Lora extensions from Civitai. To be fair, with the Waifu Diffusion model (the model the Lora model was trained on), none of the Lora models will work, but the point is both Hentai Diffusion and Lewd Diffusion will work with some Lora models, but Waifu Diffusion won't work with any… although that is a separate problem, the log messages seem to be about the same, so I suspect that they are related.

bmaltais commented 1 year ago

Did you install the extension in auto1111 to properly render the model? Possibly this one? https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris

Hard to tell without knowing whattype of LoRA you trained.

Deejay85 commented 1 year ago

The Lora model that I am using is as follows:

https://civitai.com/models/9221/multiplebreasts

Creating a new build to work off of, I found out that when I removed the Lora model entirely, Waifu Diffusion would actually work again as intended. The only headache however is that I have no idea why a file NOT being used would cause such a problem. The location of the file was in the model\Lora folder, meaning it was accessible by the multiple networks icon. For testing purposes I of course did not install the additional networks extension.

bmaltais commented 1 year ago

Probably because the default auto1111 can't handle this LoRA type. You need to install the appropriate LoRA extension for that type and put the file in the folder specific to it. That should take care of the errors.

Deejay85 commented 1 year ago

THIS Lora type? I didn't even know there was more than one type of Lora file format out there. In order to get this to work, what would I have to do? All I see relating to the file is that it's a Lora type and nothing else.

bmaltais commented 1 year ago

How did you create the LoRA using the GUI? You left it as a Standard lora type?

image

Deejay85 commented 1 year ago

Well the thing is I wasn't the one who created it. I downloaded it from CivitAI (link above). I got no proof of it, but the about version says the following:

"Can also be used in parallel with V1 or V1.5 at a lower weight for better results."

I assume that he is using 1.5, and since Waifu Diffusion is trained on 2.0, I think that might be the problem. Assuming it's the same guy, 1.5 is what is listed for the following Lora models:

https://civitai.com/models/9014/extra-breasts

https://civitai.com/models/15074

Point is I'm looking for some guidance on what to do next, and if possible, to convert the Lora files to something that will hopefully work with my current model.

bmaltais commented 1 year ago

Indeed, it look like this LoRA is made for SD1.5 models and not 2.x