Fix balanced offload offload post not activating

This commit is contained in:
Disty0
2025-04-16 22:52:30 +03:00
parent 534cccbb29
commit e4c7aa75f7
+1 -1
View File
@@ -299,7 +299,7 @@ def apply_balanced_offload(sd_model=None, exclude=[]):
if device_map and max_memory:
module.balanced_offload_device_map = device_map
module.balanced_offload_max_memory = max_memory
module.offload_post = shared.sd_model_type in [offload_post] and shared.opts.te_hijack and module_name.startswith("text_encoder")
module.offload_post = shared.sd_model_type in offload_post and shared.opts.te_hijack and module_name.startswith("text_encoder")
devices.torch_gc(fast=True, force=True, reason='offload')
apply_balanced_offload_to_module(sd_model)