Spaces:
Runtime error
Runtime error
Try to improve speed?
Browse files
test.py
CHANGED
@@ -5,6 +5,11 @@ import cv2
|
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
import architecture as arch
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
model_path = '4x_eula_digimanga_bw_v2_nc1_307k.pth'
|
10 |
img_path = sys.argv[1]
|
|
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
import architecture as arch
|
8 |
+
import multiprocessing
|
9 |
+
|
10 |
+
cpu_count = multiprocessing.cpu_count()
|
11 |
+
|
12 |
+
torch.set_num_threads(cpu_count)
|
13 |
|
14 |
model_path = '4x_eula_digimanga_bw_v2_nc1_307k.pth'
|
15 |
img_path = sys.argv[1]
|