Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
try xvaserver
Browse files- app.py +0 -1
- resources/app/no_server.py +3 -4
app.py
CHANGED
@@ -7,7 +7,6 @@ from subprocess import Popen, PIPE
|
|
7 |
import threading
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
import gradio as gr
|
10 |
-
import resources.app.no_server as xvaserver
|
11 |
|
12 |
try:
|
13 |
import resources.app.no_server as xvaserver
|
|
|
7 |
import threading
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
import gradio as gr
|
|
|
10 |
|
11 |
try:
|
12 |
import resources.app.no_server as xvaserver
|
resources/app/no_server.py
CHANGED
@@ -96,8 +96,8 @@ except:
|
|
96 |
except:
|
97 |
pass
|
98 |
|
99 |
-
|
100 |
-
|
101 |
|
102 |
|
103 |
try:
|
@@ -113,7 +113,7 @@ plugin_manager.run_plugins(plist=plugin_manager.plugins["start"]["pre"], event="
|
|
113 |
|
114 |
|
115 |
# ======================== Models manager
|
116 |
-
|
117 |
try:
|
118 |
from python.models_manager import ModelsManager
|
119 |
models_manager = ModelsManager(logger, PROD, device="cpu")
|
@@ -128,7 +128,6 @@ print("Models ready")
|
|
128 |
logger.info("Models ready")
|
129 |
|
130 |
|
131 |
-
global modelsPaths
|
132 |
post_data = ""
|
133 |
def loadModel(post_data):
|
134 |
logger.info("Direct: loadModel")
|
|
|
96 |
except:
|
97 |
pass
|
98 |
|
99 |
+
if CPU_ONLY:
|
100 |
+
torch_dml_device = torch.device("cpu")
|
101 |
|
102 |
|
103 |
try:
|
|
|
113 |
|
114 |
|
115 |
# ======================== Models manager
|
116 |
+
modelsPaths = {}
|
117 |
try:
|
118 |
from python.models_manager import ModelsManager
|
119 |
models_manager = ModelsManager(logger, PROD, device="cpu")
|
|
|
128 |
logger.info("Models ready")
|
129 |
|
130 |
|
|
|
131 |
post_data = ""
|
132 |
def loadModel(post_data):
|
133 |
logger.info("Direct: loadModel")
|