mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-01 06:44:56 +02:00
Moved time before model.to
This commit is contained in:
parent
ccb7a553c2
commit
88ef1a3c5b
@ -270,8 +270,8 @@ def wait_move(model, target_device=None): # Send to target_device and wait until
|
|||||||
if start_mem <= 0: return
|
if start_mem <= 0: return
|
||||||
model_name = model.__class__.__name__
|
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')
|
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()
|
start_time = time.time()
|
||||||
|
model.to(target_device)
|
||||||
time_step = start_time
|
time_step = start_time
|
||||||
WARNING_TIMEOUT = 1.5 # seconds - Show activity in console after timeout.
|
WARNING_TIMEOUT = 1.5 # seconds - Show activity in console after timeout.
|
||||||
last_mem = start_mem
|
last_mem = start_mem
|
||||||
|
Loading…
Reference in New Issue
Block a user