Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging feature in WebUI #1821

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/stable_diffusion/src/utils/stable_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,13 @@ def is_valid_file(arg):
help="Flag for enabling rest API.",
)

p.add_argument(
"--debug",
default=False,
action=argparse.BooleanOptionalAction,
help="Flag for enabling debugging log in WebUI.",
)

p.add_argument(
"--output_gallery",
default=True,
Expand Down
3 changes: 3 additions & 0 deletions apps/stable_diffusion/web/index.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from multiprocessing import Process, freeze_support
import os
import sys
import logging

if sys.platform == "darwin":
# import before IREE to avoid torch-MLIR library issues
Expand Down Expand Up @@ -41,6 +42,8 @@ def launch_app(address):


if __name__ == "__main__":
if args.debug:
logging.basicConfig(level=logging.DEBUG)
# required to do multiprocessing in a pyinstaller freeze
freeze_support()
if args.api or "api" in args.ui.split(","):
Expand Down