mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-22 06:08:46 +00:00
Update src/refiners/foundationals/latent_diffusion/lora.py
Co-authored-by: Laureηt <laurent@lagon.tech>
This commit is contained in:
parent
eb9abefe07
commit
b1c200c63a
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue