mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 02:30:30 -08:00
work on startup profile display
This commit is contained in:
parent
05e6fc9aa9
commit
0cc05fc492
9 changed files with 159 additions and 14 deletions
|
|
@ -7,6 +7,8 @@ from typing import Optional, Dict, Any
|
|||
from fastapi import FastAPI
|
||||
from gradio import Blocks
|
||||
|
||||
from modules import timer
|
||||
|
||||
|
||||
def report_exception(c, job):
|
||||
print(f"Error executing callback {job} for {c.script}", file=sys.stderr)
|
||||
|
|
@ -123,6 +125,7 @@ def app_started_callback(demo: Optional[Blocks], app: FastAPI):
|
|||
for c in callback_map['callbacks_app_started']:
|
||||
try:
|
||||
c.callback(demo, app)
|
||||
timer.startup_timer.record(c.script)
|
||||
except Exception:
|
||||
report_exception(c, 'app_started_callback')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue