justin-shopcapsule
commited on
Commit
·
bbf0db3
1
Parent(s):
9b6af77
Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -310,7 +310,7 @@ class RealESRGAN:
|
|
310 |
|
311 |
print('input_batch.shape', input_batch.shape)
|
312 |
|
313 |
-
|
314 |
with torch.no_grad():
|
315 |
# res = self.model(input_batch[0:batch_size])
|
316 |
|
@@ -328,7 +328,7 @@ class RealESRGAN:
|
|
328 |
print('i is', i)
|
329 |
res = torch.cat((res, self.model(img[i:i+batch_size])), 0)
|
330 |
print('res.shape 2', res.shape)
|
331 |
-
|
332 |
print('res.shape 3', res.shape)
|
333 |
|
334 |
# 1/0
|
|
|
310 |
|
311 |
print('input_batch.shape', input_batch.shape)
|
312 |
|
313 |
+
start2 = time.time()
|
314 |
with torch.no_grad():
|
315 |
# res = self.model(input_batch[0:batch_size])
|
316 |
|
|
|
328 |
print('i is', i)
|
329 |
res = torch.cat((res, self.model(img[i:i+batch_size])), 0)
|
330 |
print('res.shape 2', res.shape)
|
331 |
+
print('inference alone takes', time.time() - start2)
|
332 |
print('res.shape 3', res.shape)
|
333 |
|
334 |
# 1/0
|