mirror of
https://github.com/vladmandic/automatic
synced 2026-09-04 03:50:44 +02:00
9e9e2f45ed
Fourteen axes drive the attention subsystem from the grid: the diffusers method, the sdp override chain, the dispatcher kernel, five sdnq attention knobs and six sparse settings. An axis writes shared.opts.data and rebuilds the chain itself, since the onchange for these settings runs through the queue lock a grid cell already holds. SharedSettingsStackHelper saves and restores every attention setting around the grid, keys an axis introduced included, and an axis for a setting a backend owns warns when that backend is not in the active chain.
13 lines
1.0 KiB
Python
13 lines
1.0 KiB
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, list_dispatcher_backends, 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', 'list_dispatcher_backends', 'hijack_kernels', 'get_kernel_hijack', 'get_hf_api_hijack',
|
|
'backends', 'context', 'debug',
|
|
]
|