mirror of
https://github.com/vladmandic/automatic
synced 2026-09-06 21:10:45 +02:00
b57b8c6a64
The sdnq backend read six settings on every call; it now captures them when the chain is built. Each backend declares the settings its call captures, and webui registers one onchange over those names plus the override set and the torch kernel flags, so a change rebuilds the chain between jobs. When a compiled model is resident the rebuild also resets dynamo, since its graphs hold the previous router.
13 lines
989 B
Python
13 lines
989 B
Python
"""Attention backends: one scaled_dot_product_attention router over the registered backends, the per-generation context, and the diffusers-side processor and dispatcher setup."""
|
|
from modules.attention.registry import AttentionBackend, AttentionCall, Constraints, Platform, Registry, registry
|
|
from modules.attention.router import Plan, PlanEntry, build_plan, get_plan, install_router, reapply, reapply_options, report
|
|
from modules.attention.dispatcher import set_diffusers_attention, set_attention_dispatcher, hijack_kernels, get_kernel_hijack, get_hf_api_hijack
|
|
from modules.attention import backends, context, debug
|
|
|
|
__all__ = [
|
|
'AttentionBackend', 'AttentionCall', 'Constraints', 'Platform', 'Registry', 'registry',
|
|
'Plan', 'PlanEntry', 'build_plan', 'get_plan', 'install_router', 'reapply', 'reapply_options', 'report',
|
|
'set_diffusers_attention', 'set_attention_dispatcher', 'hijack_kernels', 'get_kernel_hijack', 'get_hf_api_hijack',
|
|
'backends', 'context', 'debug',
|
|
]
|