Update src/refiners/foundationals/latent_diffusion/lora.py

Co-authored-by: Laureηt <laurent@lagon.tech>
This commit is contained in:
Pierre Chapuis 2024-02-07 14:35:22 +01:00
parent eb9abefe07
commit b1c200c63a

View file

@ -245,8 +245,8 @@ class SDLoraManager:
# get the suffix and score for `key` (default: no suffix, highest score = 5) # get the suffix and score for `key` (default: no suffix, highest score = 5)
(sfx, score) = next(((k, v) for k, v in key_char_order.items() if key.endswith(k)), ("", 5)) (sfx, score) = next(((k, v) for k, v in key_char_order.items() if key.endswith(k)), ("", 5))
# return tuple of: (padded key prefix, score) padded_key_prefix = SDLoraManager.pad(key.removesuffix(sfx))
return (SDLoraManager.pad(key.removesuffix(sfx)), score) return (padded_key_prefix, score)
@staticmethod @staticmethod
def auto_attach( def auto_attach(