diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-13 18:19:41 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-13 18:19:41 +0000 |
commit | dc3906185656dae75fcefe96625b1dcd0d31579c (patch) | |
tree | a54f25be31f92ffe0e901a3c2092582097f72289 /extensions-builtin/Lora/lora.py | |
parent | 6c5f83b19b331d51bde28c5033d13d0d64c11e54 (diff) | |
download | stable-diffusion-webui-gfx803-dc3906185656dae75fcefe96625b1dcd0d31579c.tar.gz stable-diffusion-webui-gfx803-dc3906185656dae75fcefe96625b1dcd0d31579c.tar.bz2 stable-diffusion-webui-gfx803-dc3906185656dae75fcefe96625b1dcd0d31579c.zip |
thank you linter
Diffstat (limited to 'extensions-builtin/Lora/lora.py')
-rw-r--r-- | extensions-builtin/Lora/lora.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 4b5da7b5..302490fb 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -229,9 +229,9 @@ def load_lora(name, lora_on_disk): elif type(sd_module) == torch.nn.Conv2d and weight.shape[2:] == (3, 3):
module = torch.nn.Conv2d(weight.shape[1], weight.shape[0], (3, 3), bias=False)
else:
- print(f'Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}')
+ print(f'Lora layer {key_lora} matched a layer with unsupported type: {type(sd_module).__name__}')
continue
- raise AssertionError(f"Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}")
+ raise AssertionError(f"Lora layer {key_lora} matched a layer with unsupported type: {type(sd_module).__name__}")
with torch.no_grad():
module.weight.copy_(weight)
@@ -243,7 +243,7 @@ def load_lora(name, lora_on_disk): elif lora_key == "lora_down.weight":
lora_module.down = module
else:
- raise AssertionError(f"Bad Lora layer name: {key_diffusers} - must end in lora_up.weight, lora_down.weight or alpha")
+ raise AssertionError(f"Bad Lora layer name: {key_lora} - must end in lora_up.weight, lora_down.weight or alpha")
if keys_failed_to_match:
print(f"Failed to match keys when loading Lora {lora_on_disk.filename}: {keys_failed_to_match}")
|