forked from ototadana/sd-face-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.py
More file actions
33 lines (25 loc) · 800 Bytes
/
Copy pathinstall.py
File metadata and controls
33 lines (25 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
try:
from face_editor.io.util import load_classes_from_directory
except Exception:
import os
import sys
sys.path.append(os.path.dirname(__file__))
from face_editor.io.util import load_classes_from_directory
import traceback
import launch
from modules import shared
from face_editor.use_cases.installer import Installer
if not shared.opts:
from modules import shared_init
shared_init.initialize()
if shared.opts.data.get("face_editor_additional_components", None) is not None:
for cls in load_classes_from_directory(Installer, True):
try:
cls().install()
except Exception as e:
print(traceback.format_exc())
print(f"Face Editor: {e}")
launch.run_pip(
"install lark",
"requirements for Face Editor",
)