From 4500ca8693927fdb7cc28d7a9e50d80162b60503 Mon Sep 17 00:00:00 2001 From: hako-mikan <122196982+hako-mikan@users.noreply.github.com> Date: Sun, 2 Feb 2025 22:45:10 +0900 Subject: [PATCH 1/2] #179 --- scripts/lora_block_weight.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/lora_block_weight.py b/scripts/lora_block_weight.py index 8eae227..1e20145 100644 --- a/scripts/lora_block_weight.py +++ b/scripts/lora_block_weight.py @@ -936,16 +936,21 @@ def loradealer(self, prompts,lratios,elementals, extra_network_data = None): print(f"LoRA Block weight ({ltype}): {name}: (Te:{te},Unet:{unet}) x {ratios}") go_lbw = True fparams.append([unet,ratios,elem]) + + if start is not None: + start = int(start) + self.starts[name] = [start,te,unet] + self.log["starts"] = load = True + + if stop is not None: + stop = int(stop) + self.stops[name] = int(stop) + self.log["stops"] = load = True + settolist([lorans,te_multipliers,unet_multipliers,lorars,elements,starts,stops],[name,te,unet,ratios,elem,start,stop]) self.log[name] = [te,unet,ratios,elem,start,stop] - if start: - self.starts[name] = [int(start),te,unet] - self.log["starts"] = load = True - if stop: - self.stops[name] = int(stop) - self.log["stops"] = load = True self.startsf = [int(s) if s is not None else None for s in starts] self.stopsf = [int(s) if s is not None else None for s in stops] From 14b14e2480a7e73be1c159e1edea021190152c20 Mon Sep 17 00:00:00 2001 From: hako-mikan <122196982+hako-mikan@users.noreply.github.com> Date: Sun, 2 Feb 2025 22:45:49 +0900 Subject: [PATCH 2/2] delete debug --- scripts/lora_block_weight.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/lora_block_weight.py b/scripts/lora_block_weight.py index 1e20145..15894f5 100644 --- a/scripts/lora_block_weight.py +++ b/scripts/lora_block_weight.py @@ -1219,10 +1219,6 @@ def lbwf(after_applying_lora_patches, ms, lwei, elements, starts, flux): errormodules = [] dict_lora_patches = dict(after_applying_lora_patches.items()) - for key in dict_lora_patches: - print(dict_lora_patches[key]) - break - for m, l, e, s, hash in zip(ms, lwei, elements, starts, list(after_applying_lora_patches.keys())): lora_patches = None for k, v in dict_lora_patches.items():