add warm begin end
Browse files
wfx.py
CHANGED
@@ -111,9 +111,11 @@ class WFX():
|
|
111 |
if warmed < warmed_total:
|
112 |
logger.info(f'warming up T2I pipeline...')
|
113 |
for _ in range(warmed_total):
|
|
|
114 |
self.T2IPipeline(**warmup_kwargs)
|
|
|
115 |
warmed += 1
|
116 |
-
logger.info(f'warmed {warmed}/{warmed_total}')
|
117 |
|
118 |
|
119 |
|
|
|
111 |
if warmed < warmed_total:
|
112 |
logger.info(f'warming up T2I pipeline...')
|
113 |
for _ in range(warmed_total):
|
114 |
+
begin = torch.cuda.Event(enable_timing=True)
|
115 |
self.T2IPipeline(**warmup_kwargs)
|
116 |
+
end = torch.cuda.Event(enable_timing=True)
|
117 |
warmed += 1
|
118 |
+
logger.info(f'warmed {warmed}/{warmed_total} - {begin.elapsed_time(end)}ms')
|
119 |
|
120 |
|
121 |
|