mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
fix(attention): report when sparse attention cannot act
A sequence below the minimum length left the feature enabled and idle with nothing in the log. The stage now records why it declined and says so once per length, so an enabled setting that cannot act is visible rather than quiet.
This commit is contained in:
@@ -373,6 +373,7 @@ def test_stage_gates():
|
||||
assert stage(q, k, v, None, True) is None, 'a causal call is not eligible yet'
|
||||
assert stage(q, cross_k, cross_v, None, False) is None, 'cross attention is not eligible'
|
||||
assert stage(short_q, short_k, short_v, None, False) is None, 'below the gate attention stays dense'
|
||||
assert stage.last_skip == 'below the minimum sequence', stage.last_skip
|
||||
ctx.set_role('vae')
|
||||
assert stage(q, k, v, None, False) is None, 'only the denoiser is sparsified'
|
||||
ctx.set_role('transformer')
|
||||
|
||||
Reference in New Issue
Block a user