mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
add dynamo options
This commit is contained in:
Submodule extensions-builtin/sd-webui-controlnet updated: 09d1fcbf4d...d2da774a40
@@ -178,7 +178,8 @@ class StableDiffusionModelHijack:
|
||||
if opts.cuda_compile and opts.cuda_compile_mode != 'none':
|
||||
try:
|
||||
import torch._dynamo as dynamo # pylint: disable=unused-import
|
||||
torch._dynamo.config.verbose = True # pylint: disable=protected-access
|
||||
torch._dynamo.config.verbose = opts.cuda_compile_verbose # pylint: disable=protected-access
|
||||
torch._dynamo.config.suppress_errors = opts.cuda_compile_errors # pylint: disable=protected-access
|
||||
torch.backends.cudnn.benchmark = True
|
||||
m.model = torch.compile(m.model, mode="default", backend=opts.cuda_compile_mode, fullgraph=False, dynamic=False)
|
||||
print("Model compile enabled:", opts.cuda_compile_mode)
|
||||
|
||||
@@ -325,6 +325,8 @@ options_templates.update(options_section(('cuda', "CUDA Settings"), {
|
||||
"cuda_allow_tf16_reduced": OptionInfo(True, "Allow TF16 reduced precision math ops"),
|
||||
"cuda_compile": OptionInfo(False, "Enable model compile (experimental)"),
|
||||
"cuda_compile_mode": OptionInfo("none", "Model compile mode (experimental)", gr.Radio, lambda: {"choices": ['none', 'inductor', 'cudagraphs', 'aot_ts_nvfuser']}),
|
||||
"cuda_compile_verbose": OptionInfo(True, "Compile verbose mode"),
|
||||
"cuda_compile_errors": OptionInfo(True, "Compile suppress errors"),
|
||||
}))
|
||||
|
||||
options_templates.update(options_section(('upscaling', "Upscaling"), {
|
||||
|
||||
+1
-1
Submodule wiki updated: 6cd8fde165...4cbdffaa95
Reference in New Issue
Block a user