Merge branch 'v2.3' into fix/new_diffusers_names

This commit is contained in:
Lincoln Stein
2023-04-13 22:44:05 -04:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -1 +1 @@
__version__='2.3.4'
__version__='2.3.4.post1'

View File

@@ -339,12 +339,14 @@ class KohyaLoraManager:
return lora
def apply_lora_model(self, name, mult: float = 1.0):
path_file = None
for suffix in ["ckpt", "safetensors", "pt"]:
path_file = Path(self.lora_path, f"{name}.{suffix}")
if path_file.exists():
path_files = [x for x in Path(self.lora_path).glob(f"**/{name}.{suffix}")]
if len(path_files):
path_file = path_files[0]
print(f" | Loading lora {path_file.name} with weight {mult}")
break
if not path_file.exists():
if not path_file:
print(f" ** Unable to find lora: {name}")
return