From 88ef1a3c5becc3aa35347bb26babf65c8d99a58a Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Fri, 21 Oct 2022 20:22:34 -0400 Subject: [PATCH] Moved time before model.to --- ui/sd_internal/runtime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/sd_internal/runtime.py b/ui/sd_internal/runtime.py index 132658e1..9b052397 100644 --- a/ui/sd_internal/runtime.py +++ b/ui/sd_internal/runtime.py @@ -270,8 +270,8 @@ def wait_move(model, target_device=None): # Send to target_device and wait until if start_mem <= 0: return model_name = model.__class__.__name__ print(f'Device:{thread_data.device} - Sending model {model_name} to {target_device} | Memory transfer starting. Memory Used: {round(start_mem)}Mo') - model.to(target_device) start_time = time.time() + model.to(target_device) time_step = start_time WARNING_TIMEOUT = 1.5 # seconds - Show activity in console after timeout. last_mem = start_mem