Merge branch 'dev' into feat/attention-core

dev added sdnq_attention_quantize_fp32 to modules/attention.py, which this
branch replaced with the modules/attention package. The option moves to the
sdnq backend in two places: the options dict the prepared call captures, and
the options tuple that rebuilds the chain when a captured option changes.
Reading it in only the first place would leave a setting that takes effect on
the next model load and not before.

The new option gets a hint alongside the rest of the section.
This commit is contained in:
CalamitousFelicitousness
2026-08-24 22:54:59 +01:00
18 changed files with 248 additions and 78 deletions
+8 -3
View File
@@ -247,6 +247,10 @@ def process_images(p: StableDiffusionProcessing) -> Processed | None:
if k == 'sd_vae':
sd_vae.reload_vae_weights()
timer.process.record('post')
if os.environ.get('SD_UNLOAD_MODEL', None) is not None:
sd_models.unload_model_weights()
return results
@@ -424,10 +428,11 @@ def print_stats():
log.debug(f'Processed: memory={memstats.memory_stats()}')
if devices.triton_ok:
from modules.timer_sdnq import update_sdnq_attention_timers
update_sdnq_attention_timers()
# 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)}')
log.debug(f'Processed: autotune={timer.autotune.dct(min_time=0, no_total=True)}')
timer.autotune.reset()
from modules.sd_models_compile import update_compile_times
update_compile_times()