mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
restore ability to launch web server with invokeai --web
This commit is contained in:
parent
56f4712814
commit
8d88ad3b8d
19
invokeai/frontend/legacy_launch_invokeai.py
Normal file
19
invokeai/frontend/legacy_launch_invokeai.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('--web', action='store_true')
|
||||||
|
opts,_ = parser.parse_known_args()
|
||||||
|
|
||||||
|
if opts.web:
|
||||||
|
sys.argv.pop(sys.argv.index('--web'))
|
||||||
|
from invokeai.app.api_app import invoke_api
|
||||||
|
invoke_api()
|
||||||
|
else:
|
||||||
|
from invokeai.app.cli_app import invoke_cli
|
||||||
|
invoke_cli()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
@ -112,7 +112,11 @@ dependencies = [
|
|||||||
"textual_inversion.py" = "invokeai.frontend.training:invokeai_textual_inversion"
|
"textual_inversion.py" = "invokeai.frontend.training:invokeai_textual_inversion"
|
||||||
|
|
||||||
# shortcut commands to start cli and web
|
# shortcut commands to start cli and web
|
||||||
"invokeai" = "invokeai.app.cli_app:invoke_cli"
|
# "invokeai --web" will launch the web interface
|
||||||
|
# "invokeai" will launch the CLI
|
||||||
|
"invokeai" = "invokeai.frontend.legacy_launch_invokeai:main"
|
||||||
|
|
||||||
|
# new shortcut to launch web interface
|
||||||
"invokeai-web" = "invokeai.app.api_app:invoke_api"
|
"invokeai-web" = "invokeai.app.api_app:invoke_api"
|
||||||
|
|
||||||
# full commands
|
# full commands
|
||||||
|
Loading…
Reference in New Issue
Block a user