Skip to content

Commit d81584c

Browse files
authored
hotfix to 2.3.4 (#3188)
- Pin diffusers to 0.14 - Small fix to LoRA loading routine that was preventing placement of LoRA files in subdirectories. - Bump version to 2.3.4.post1
2 parents 018d5da + 1183bf9 commit d81584c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ldm/invoke/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__='2.3.4'
1+
__version__='2.3.4.post1'

ldm/modules/kohya_lora_manager.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,14 @@ def load_lora_module(self, name, path_file, multiplier: float = 1.0):
339339
return lora
340340

341341
def apply_lora_model(self, name, mult: float = 1.0):
342+
path_file = None
342343
for suffix in ["ckpt", "safetensors", "pt"]:
343-
path_file = Path(self.lora_path, f"{name}.{suffix}")
344-
if path_file.exists():
344+
path_files = [x for x in Path(self.lora_path).glob(f"**/{name}.{suffix}")]
345+
if len(path_files):
346+
path_file = path_files[0]
345347
print(f" | Loading lora {path_file.name} with weight {mult}")
346348
break
347-
if not path_file.exists():
349+
if not path_file:
348350
print(f" ** Unable to find lora: {name}")
349351
return
350352

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"clip_anytorch",
3535
"compel~=1.1.0",
3636
"datasets",
37-
"diffusers[torch]~=0.14",
37+
"diffusers[torch]==0.14",
3838
"dnspython==2.2.1",
3939
"einops",
4040
"eventlet",

0 commit comments

Comments
 (0)