mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
21 lines
505 B
Python
21 lines
505 B
Python
|
# Copyright (c) 2022 Kyle Schouviller (https://github.com/kyle0654)
|
||
|
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
def main():
|
||
|
# Change working directory to the repo root
|
||
|
os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||
|
|
||
|
if '--web' in sys.argv:
|
||
|
from ldm.invoke.app.api_app import invoke_api
|
||
|
invoke_api()
|
||
|
else:
|
||
|
# TODO: Parse some top-level args here.
|
||
|
from ldm.invoke.app.cli_app import invoke_cli
|
||
|
invoke_cli()
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|