Commit Graph
3 Commits
Author SHA1 Message Date
WildAi 900ceda564 fix: resolve review issues W1-W9; suite green (1107 passed) 2026-08-25 16:09:05 +03:00
WildAi 867a346552 fix(hrdit): Anima crashes + node-order independence
G1: wrapper now mirrors the real ComfyUI optimized_attention signature (mask/attn_precision/skip_reshape/skip_output_reshape in slots 5-8) and forwards orig() with the correct positional order - the pre-fix wrapper fed skip_reshape into the mask slot on the unmasked Anima/cosmos path (AttributeError: bool.ndim).

G2: pytest mock _sdpa flipped to the real ComfyUI signature (it matched the wrapper's inverted convention, hiding G1); conformance tripwire added (tests/test_orig_call_convention.py).

G3: HAP decline-guards - non-square attention (cross-attn) and plan/model head-count mismatch decline to plain attention with one-time logs instead of crashing or computing wrong math.

G4: _hrdit_carry_state() re-applies HRDiT patcher attrs after ModelPatcher.clone() in both apply functions (+ _hrdit_state_ref indirection), so SPA->HAP / HAP->SPA chaining is order-independent.

SPA non-square guard: averaged passes apply spatial RoPE to both q and k (only valid for square self-attention); Anima cross-attention (q_len != k_len) crashed einsum - now declined to plain attention.

README: v2.7.1 changelog + HAP model-specificity/v1-limitation notes.
2026-08-16 19:02:29 +03:00
WildAi b9578e7400 feat(hrdit): add HAP node, calibration, scaling
- HAP runtime: per-head scope plans via FlexAttention
  (CUDA + torch>=2.5) with SDPA dense-mask fallback
- Calibration: Taylor-softmax scoring + knapsack solver
  (calibration/calibrate_hap.py, --dry_run toy pipeline)
- Shipped FLUX scope plan (configs/scope_plan_flux.json)
- SPA+HAP compose via refcounted shared hook install
- proportional_attention knob on SPA+HAP (default off)
- spa_layer_filter knob on SPA (flat index spec)
- Demote "SPA averaged-attention ACTIVE" log to debug
- README: HAP section, coverage matrix, v2.7.0 changelog
2026-08-16 01:41:20 +03:00