aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_hijack.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-10 07:52:45 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-10 07:52:45 +0300
commit762265eab58cdb8f2d6398769bab43d8b8db0075 (patch)
tree7766901f867d84cf0662b2ae0d5bc55c673a08e8 /modules/sd_hijack.py
parenta617d6488275a58da0627b3fed5f53593b2eb8b2 (diff)
autofixes from ruff
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r--modules/sd_hijack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py
index f4bb0266..d8135211 100644
--- a/modules/sd_hijack.py
+++ b/modules/sd_hijack.py
@@ -118,7 +118,7 @@ def weighted_forward(sd_model, x, c, w, *args, **kwargs):
try:
#Delete temporary weights if appended
del sd_model._custom_loss_weight
- except AttributeError as e:
+ except AttributeError:
pass
#If we have an old loss function, reset the loss function to the original one
@@ -133,7 +133,7 @@ def apply_weighted_forward(sd_model):
def undo_weighted_forward(sd_model):
try:
del sd_model.weighted_forward
- except AttributeError as e:
+ except AttributeError:
pass