Spaces:
Paused
Paused
added API_MODE flag in async_worker to prevent loading models when in API_MODE
Browse files- modules/async_worker.py +3 -2
modules/async_worker.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
import threading
|
| 2 |
import re
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
patch_all()
|
| 6 |
|
| 7 |
class AsyncTask:
|
| 8 |
def __init__(self, args):
|
|
|
|
| 1 |
import threading
|
| 2 |
import re
|
| 3 |
+
if not args.api_mode:
|
| 4 |
+
from modules.patch import PatchSettings, patch_settings, patch_all
|
| 5 |
|
| 6 |
+
patch_all()
|
| 7 |
|
| 8 |
class AsyncTask:
|
| 9 |
def __init__(self, args):
|