mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
added tool for profiling code
This commit is contained in:
@@ -129,6 +129,22 @@ options_templates.update(options_section(('system', "System", "system"), {
|
||||
"dump_stacks_on_signal": OptionInfo(False, "Print stack traces before exiting the program with ctrl+c."),
|
||||
}))
|
||||
|
||||
options_templates.update(options_section(('profiler', "Profiler", "system"), {
|
||||
"profiling_explanation": OptionHTML("""
|
||||
Those settings allow you to enable torch profiler when generating pictures.
|
||||
Profiling allows you to see which code uses how much of computer's resources during generation.
|
||||
Each generation writes its own profile to one file, overwriting previous.
|
||||
The file can be viewed in <a href="chrome:tracing">Chrome</a>, or on a <a href="https://ui.perfetto.dev/">Perfetto</a> web site.
|
||||
Warning: writing profile can take a lot of time, up to 30 seconds, and the file itelf can be around 500MB in size.
|
||||
"""),
|
||||
"profiling_enable": OptionInfo(False, "Enable profiling"),
|
||||
"profiling_activities": OptionInfo(["CPU"], "Activities", gr.CheckboxGroup, {"choices": ["CPU", "CUDA"]}),
|
||||
"profiling_record_shapes": OptionInfo(True, "Record shapes"),
|
||||
"profiling_profile_memory": OptionInfo(True, "Profile memory"),
|
||||
"profiling_with_stack": OptionInfo(True, "Include python stack"),
|
||||
"profiling_filename": OptionInfo("trace.json", "Profile filename"),
|
||||
}))
|
||||
|
||||
options_templates.update(options_section(('API', "API", "system"), {
|
||||
"api_enable_requests": OptionInfo(True, "Allow http:// and https:// URLs for input images in API", restrict_api=True),
|
||||
"api_forbid_local_requests": OptionInfo(True, "Forbid URLs to local resources", restrict_api=True),
|
||||
|
Reference in New Issue
Block a user