tharms commited on
Commit
96cad0c
·
1 Parent(s): 6145947

added API_MODE flag in async_worker to prevent loading models when in API_MODE

Browse files
Files changed (1) hide show
  1. modules/async_worker.py +3 -2
modules/async_worker.py CHANGED
@@ -1,8 +1,9 @@
1
  import threading
2
  import re
3
- from modules.patch import PatchSettings, patch_settings, patch_all
 
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):