Spaces:
Runtime error
Runtime error
Your Name commited on
Commit ·
f175c06
1
Parent(s): 1d83b48
multithreading
Browse files
webui.py
CHANGED
|
@@ -24,6 +24,10 @@ import gradio as gr
|
|
| 24 |
import numpy as np
|
| 25 |
from config import config
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
net_g = None
|
| 28 |
|
| 29 |
device = config.device
|
|
|
|
| 24 |
import numpy as np
|
| 25 |
from config import config
|
| 26 |
|
| 27 |
+
# multithreading
|
| 28 |
+
torch.set_num_threads(os.cpu_count())
|
| 29 |
+
torch.set_num_interop_threads(os.cpu_count())
|
| 30 |
+
|
| 31 |
net_g = None
|
| 32 |
|
| 33 |
device = config.device
|