Files
olivv-cs-ComfyUI-FunPack/tests
digital-garbage 676edbfb18 fix: H3 query steering -- NaN strength disagreement, and capture leaking temperature scaling
Two real faults found by a third adversarial review round on 4154746:

- _install_h3_av_decouple's own bail check (`_strength <= 0.0`) disagreed with
  _sample_chunk's install guard (`h3_av_decouple > 0.0`) for a NaN strength:
  every ordered comparison is False for NaN under IEEE 754, so `<= 0.0` let a
  NaN through as "on" while the guard treated the same value as "off" --
  reproducing the exact av_decouple-defeats-q_steering bug the last fix
  closed, just reached through a different value. Both now use the same
  `not (x > 0.0)` predicate so they can't disagree.
- h3_q_steering was installed before h3_explore_temperature, so if both
  target the same block, temperature's Q-scaling reached q_steering's
  capture before it ran -- banking a temperature-distorted "natural Q"
  descriptor, contradicting the mechanism's own documented ordering promise
  (capture reflects the network's natural Q, same claim h3_repr_steering
  makes for hidden state). q_steering is now installed last (outermost),
  after both av_decouple and attn_temperature, so it always sees Q first.
  av_decouple still can't compose with q_steering at all regardless of
  order (unrelated masking issue, already handled by skipping install).

Regression tests for both, plus a NaN case added to h3_av_decouple's own
existing zero-strength no-op test.
2026-09-07 04:26:12 +03:00
..