InvokeAI/invokeai/frontend/legacy_launch_invokeai.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
436 B
Python
Raw Normal View History

import argparse
2023-08-18 14:57:18 +00:00
import sys
2023-07-27 14:54:01 +00:00
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
2023-07-27 14:54:01 +00:00
invoke_api()
else:
from invokeai.app.cli_app import invoke_cli
2023-07-27 14:54:01 +00:00
invoke_cli()
2023-07-27 14:54:01 +00:00
if __name__ == "__main__":
main()