The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Add units/info for the numbers displayed on 'load completely' and 'load partially' log messages (#10538)
Jedrzej Kosinski998bf60bebd0
diff --git a/comfy/model_patcher.py b/comfy/model_patcher.pyindex 74b9e48bc..ed3f3f5cb 100644--- a/comfy/model_patcher.py+++ b/comfy/model_patcher.py@@ -655,6 +655,7 @@ class ModelPatcher:mem_counter = 0patch_counter = 0lowvram_counter = 0+ lowvram_mem_counter = 0loading = self._load_list()load_completely = []@@ -675,6 +676,7 @@ class ModelPatcher:if mem_counter + module_mem >= lowvram_model_memory:lowvram_weight = Truelowvram_counter += 1+ lowvram_mem_counter += module_memif hasattr(m, "prev_comfy_cast_weights"): #Already lowvramedcontinue@@ -748,10 +750,10 @@ class ModelPatcher:self.pin_weight_to_device("{}.{}".format(n, param))if lowvram_counter > 0:- logging.info("loaded partially {} {} {}".format(lowvram_model_memory / (1024 * 1024), mem_counter / (1024 * 1024), patch_counter))+ logging.info("loaded partially; {:.2f} MB usable, {:.2f} MB loaded, {:.2f} MB offloaded, lowvram patches: {}".format(lowvram_model_memory / (1024 * 1024), mem_counter / (1024 * 1024), lowvram_mem_counter / (1024 * 1024), patch_counter))self.model.model_lowvram = Trueelse:- logging.info("loaded completely {} {} {}".format(lowvram_model_memory / (1024 * 1024), mem_counter / (1024 * 1024), full_load))+ logging.info("loaded completely; {:.2f} MB usable, {:.2f} MB loaded, full load: {}".format(lowvram_model_memory / (1024 * 1024), mem_counter / (1024 * 1024), full_load))self.model.model_lowvram = Falseif full_load:self.model.to(device_to)