From 2a7fb1be2412cc7bb83c755eed30408fc4155211 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Fri, 23 Feb 2024 14:22:37 -0800 Subject: [PATCH] less verbose --- ldm_patched/modules/model_management.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ldm_patched/modules/model_management.py b/ldm_patched/modules/model_management.py index 863fea7b..1f98e122 100644 --- a/ldm_patched/modules/model_management.py +++ b/ldm_patched/modules/model_management.py @@ -427,7 +427,9 @@ def load_models_gpu(models, memory_required=0): free_memory(extra_mem, d, models_already_loaded) moving_time = time.perf_counter() - execution_start_time - print(f'Moving model(s) skipped. Cleanup has taken {moving_time:.2f} seconds') + if moving_time > 0.01: + print(f'Memory cleanup has taken {moving_time:.2f} seconds') + return print(f"Begin to load {len(models_to_load)} model{'s' if len(models_to_load) > 1 else ''}")