diff --git a/cli/sdnq-attention-benchmark.py b/cli/sdnq-attention-benchmark.py index 614eb68fe..2b28d0dd8 100755 --- a/cli/sdnq-attention-benchmark.py +++ b/cli/sdnq-attention-benchmark.py @@ -872,7 +872,8 @@ def probe_compiled_prep(): # host c++ compiler (msvc on windows) fails every sdnq attention call at generation. # must run before any other sdnq_triton_atten call: a prior eager run masks the # cold-start failure the webui hits - if not shared.opts.sdnq_dequantize_compile: + from sdnq.common import use_torch_compile + if use_torch_compile: return "disabled", None q, k, v = make_qkv(1, 2, 256, 64, structured=False) with console.status("probing compiled input prep (compiles on first run, cached afterwards)"): diff --git a/modules/devices.py b/modules/devices.py index 34e96f700..1ab2d79c1 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -456,8 +456,6 @@ def test_triton(early: bool = False): t1 = time.time() fn = f'{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access log.debug(f'Triton: pass={triton_ok} version={triton_version} fn={fn} time={t1-t0:.2f}') - if not triton_ok and opts is not None: - opts.sdnq_dequantize_compile = False return triton_ok diff --git a/modules/processing.py b/modules/processing.py index 6c75d0b5f..f897dae82 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -420,13 +420,12 @@ def print_stats(): log.debug(f'Processed: timers={timer.process.dct()}') log.debug(f'Processed: memory={memstats.memory_stats()}') - if shared.opts.sdnq_dequantize_compile: + if devices.triton_ok: from modules.timer_sdnq import update_sdnq_attention_timers update_sdnq_attention_timers() if timer.autotune.get_total() > 0.1: log.debug(f'Processed: autotune={timer.autotune.dct(min_time=0)}') - if devices.triton_ok: from modules.sd_models_compile import update_compile_times update_compile_times() dynamo_dct = timer.dynamo.dct(min_time=2.0, no_total=True) diff --git a/modules/ui_definitions.py b/modules/ui_definitions.py index 3e5d11572..5b895646a 100644 --- a/modules/ui_definitions.py +++ b/modules/ui_definitions.py @@ -189,7 +189,6 @@ def create_settings(cmd_opts): "sdnq_use_dynamic_quantization": OptionInfo(False, "Use Dynamic quantization", gr.Checkbox), "sdnq_quantize_conv_layers": OptionInfo(False, "Quantize convolutional layers", gr.Checkbox), "sdnq_quantize_embedding_layers": OptionInfo(False, "Quantize embedding layers", gr.Checkbox), - "sdnq_dequantize_compile": OptionInfo(devices.has_triton(early=True), "Dequantize using torch.compile", gr.Checkbox), "sdnq_use_quantized_matmul_conv": OptionInfo(False, "Use quantized MatMul with conv", gr.Checkbox), "sdnq_quantize_with_gpu": OptionInfo(True, "Quantize using GPU", gr.Checkbox), "sdnq_dequantize_fp32": OptionInfo(True, "Dequantize using full precision", gr.Checkbox),