Better prints.

This commit is contained in:
comfyanonymous 2024-08-08 17:05:16 -04:00
parent 65ea6be38f
commit 1e11d2d1f5
1 changed files with 2 additions and 1 deletions

View File

@ -356,7 +356,6 @@ class ModelPatcher:
return self.model return self.model
def lowvram_load(self, device_to=None, lowvram_model_memory=0, force_patch_weights=False): def lowvram_load(self, device_to=None, lowvram_model_memory=0, force_patch_weights=False):
logging.info("loading in lowvram mode {}".format(lowvram_model_memory/(1024 * 1024)))
mem_counter = 0 mem_counter = 0
patch_counter = 0 patch_counter = 0
lowvram_counter = 0 lowvram_counter = 0
@ -404,8 +403,10 @@ class ModelPatcher:
logging.debug("lowvram: loaded module regularly {} {}".format(n, m)) logging.debug("lowvram: loaded module regularly {} {}".format(n, m))
if lowvram_counter > 0: if lowvram_counter > 0:
logging.info("loaded in lowvram mode {}".format(lowvram_model_memory / (1024 * 1024)))
self.model.model_lowvram = True self.model.model_lowvram = True
else: else:
logging.info("loaded completely {} {}".format(lowvram_model_memory / (1024 * 1024), mem_counter / (1024 * 1024)))
self.model.model_lowvram = False self.model.model_lowvram = False
self.model.lowvram_patch_counter += patch_counter self.model.lowvram_patch_counter += patch_counter
self.model.device = device_to self.model.device = device_to