mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-28 10:25:05 +08:00
add --dump-sysinfo, a cmd arg to dump limited sysinfo file at startup
This commit is contained in:
parent
8d54739de5
commit
d0026da483
@ -25,6 +25,13 @@ start = launch_utils.start
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if args.dump_sysinfo:
|
||||||
|
filename = launch_utils.dump_sysinfo()
|
||||||
|
|
||||||
|
print(f"Sysinfo saved as {filename}. Exiting...")
|
||||||
|
|
||||||
|
exit(0)
|
||||||
|
|
||||||
launch_utils.startup_timer.record("initial startup")
|
launch_utils.startup_timer.record("initial startup")
|
||||||
|
|
||||||
with launch_utils.startup_timer.subcategory("prepare environment"):
|
with launch_utils.startup_timer.subcategory("prepare environment"):
|
||||||
|
@ -16,6 +16,7 @@ parser.add_argument("--test-server", action='store_true', help="launch.py argume
|
|||||||
parser.add_argument("--log-startup", action='store_true', help="launch.py argument: print a detailed log of what's happening at startup")
|
parser.add_argument("--log-startup", action='store_true', help="launch.py argument: print a detailed log of what's happening at startup")
|
||||||
parser.add_argument("--skip-prepare-environment", action='store_true', help="launch.py argument: skip all environment preparation")
|
parser.add_argument("--skip-prepare-environment", action='store_true', help="launch.py argument: skip all environment preparation")
|
||||||
parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages")
|
parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages")
|
||||||
|
parser.add_argument("--dump-sysinfo", action='store_true', help="launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit")
|
||||||
parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None)
|
parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None)
|
||||||
parser.add_argument("--do-not-download-clip", action='store_true', help="do not download CLIP model even if it's not included in the checkpoint")
|
parser.add_argument("--do-not-download-clip", action='store_true', help="do not download CLIP model even if it's not included in the checkpoint")
|
||||||
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored")
|
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored")
|
||||||
|
@ -434,3 +434,16 @@ def start():
|
|||||||
webui.api_only()
|
webui.api_only()
|
||||||
else:
|
else:
|
||||||
webui.webui()
|
webui.webui()
|
||||||
|
|
||||||
|
|
||||||
|
def dump_sysinfo():
|
||||||
|
from modules import sysinfo
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
text = sysinfo.get()
|
||||||
|
filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.txt"
|
||||||
|
|
||||||
|
with open(filename, "w", encoding="utf8") as file:
|
||||||
|
file.write(text)
|
||||||
|
|
||||||
|
return filename
|
||||||
|
Loading…
Reference in New Issue
Block a user