mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2025-12-28 13:42:02 +00:00
Add force refresh to LoRA Loader refresh function (#2584)
This commit is contained in:
parent
b835f24a4d
commit
daee4c0d8f
@ -299,10 +299,10 @@ class LoraLoader:
|
||||
self.loaded_hash = str([])
|
||||
|
||||
@torch.inference_mode()
|
||||
def refresh(self, lora_patches, offload_device=torch.device('cpu')):
|
||||
def refresh(self, lora_patches, offload_device=torch.device('cpu'), force_refresh = False):
|
||||
hashes = str(list(lora_patches.keys()))
|
||||
|
||||
if hashes == self.loaded_hash:
|
||||
if hashes == self.loaded_hash and not force_refresh:
|
||||
return
|
||||
|
||||
# Merge Patches
|
||||
|
||||
Loading…
Reference in New Issue
Block a user