Skip to content

Commit 6c9cb45

Browse files
feat(nodes): add separate scripts to launch cli and web
1 parent 959307f commit 6c9cb45

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

scripts/invoke-new.py renamed to scripts/invoke-cli.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ def main():
1212
# Change working directory to the repo root
1313
os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
1414

15-
if '--web' in sys.argv:
16-
from invokeai.app.api_app import invoke_api
17-
invoke_api()
18-
else:
19-
# TODO: Parse some top-level args here.
20-
from invokeai.app.cli_app import invoke_cli
21-
invoke_cli()
15+
# TODO: Parse some top-level args here.
16+
from invokeai.app.cli_app import invoke_cli
17+
invoke_cli()
2218

2319

2420
if __name__ == '__main__':

scripts/invoke-web.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
3+
# Copyright (c) 2022 Kyle Schouviller (https://github.com/kyle0654)
4+
5+
import logging
6+
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
7+
8+
import os
9+
import sys
10+
11+
def main():
12+
# Change working directory to the repo root
13+
os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
14+
15+
from invokeai.app.api_app import invoke_api
16+
invoke_api()
17+
18+
19+
if __name__ == '__main__':
20+
main()

0 commit comments

Comments
 (0)