Skip to content

Commit daee4c0

Browse files
authored
Add force refresh to LoRA Loader refresh function (#2584)
1 parent b835f24 commit daee4c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/patcher/lora.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ def __init__(self, model):
299299
self.loaded_hash = str([])
300300

301301
@torch.inference_mode()
302-
def refresh(self, lora_patches, offload_device=torch.device('cpu')):
302+
def refresh(self, lora_patches, offload_device=torch.device('cpu'), force_refresh = False):
303303
hashes = str(list(lora_patches.keys()))
304304

305-
if hashes == self.loaded_hash:
305+
if hashes == self.loaded_hash and not force_refresh:
306306
return
307307

308308
# Merge Patches

0 commit comments

Comments
 (0)