mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-25 00:39:12 +00:00
fix/workaround for potential memory leak (#2315)
unload old models, based on reference count <= 2 (in practise only noticed extra copies of JointTextEncoder, never KModel or IntegratedAutoencoderKL) #2281 #2308 and others
This commit is contained in:
@@ -450,7 +450,7 @@ def reload_model_weights(sd_model=None, info=None, forced_reload=False):
|
||||
|
||||
def unload_model_weights(sd_model=None, info=None):
|
||||
memory_management.unload_all_models()
|
||||
pass
|
||||
return
|
||||
|
||||
|
||||
def apply_token_merging(sd_model, token_merging_ratio):
|
||||
|
||||
Reference in New Issue
Block a user