mirror of
https://github.com/vladmandic/automatic
synced 2026-08-26 06:30:44 +02:00
remove sdnq_dequantize_compile option
- advanced users should use the env var SDNQ_USE_TORCH_COMPILE instead
This commit is contained in:
@@ -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)"):
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user