[diffusion] app: support webui (#14961)

Co-authored-by: Mick <mickjagger19@icloud.com>
This commit is contained in:
Li Jinliang
2025-12-14 21:07:36 +08:00
committed by GitHub
co-authored by Mick
parent e3f51e823e
commit 6f0c77d7f8
6 changed files with 257 additions and 11 deletions
@@ -295,6 +295,10 @@ class ServerArgs:
host: str | None = None
port: int | None = None
# TODO: webui and their endpoint, check if webui_port is available.
webui: bool = False
webui_port: int | None = 12312
scheduler_port: int = 5555
# Stage verification
@@ -613,6 +617,19 @@ class ServerArgs:
default=ServerArgs.port,
help="Port for the HTTP API server.",
)
parser.add_argument(
"--webui",
action=StoreBoolean,
default=ServerArgs.webui,
help="Whether to use webui for better display",
)
parser.add_argument(
"--webui-port",
type=int,
default=ServerArgs.webui_port,
help="Whether to use webui for better display",
)
# Stage verification
parser.add_argument(