Nodes/10S-Comfy-nodes/πŸ“Š LTX Activation Calibrator
ComfyUI Node

πŸ“Š LTX Activation Calibrator

Measure which attention directions actually fire β€” the diagnostic half of the pair

By TenStripΒ·Created 4 months agoΒ·Updated 26 days agoΒ· 244
πŸ“Š LTX Activation Calibrator
  • model
  • model
  • report
β—„output_pathcalib/override_agree.safetensorsβ–Ί
β—„condition_labelagreeβ–Ί
β—„target_filter(attn1|ff\.net|proj_out|to_gate_logits)β–Ί
β—„exclude_filterβ–Ί
β—„resetfalseβ–Ί
β—„max_targets2000β–Ί

Most of this pack's nodes change how LTX samples. The calibration pair - LTXActivationCalibrator and LTXCalibratorFlush - exists to measure it, and it's aimed at a genuinely hard problem: figuring out which internal activation directions actually light up under a given condition, not just which weights exist. The idea is to build an importance mask from real sampling behavior, then use it to guide compression or override logic downstream.

This is the "collect" half. LTXActivationCalibrator takes a MODEL, attaches forward pre-hooks that accumulate per-layer input second moments (E[xΒ²]) into a named bucket, and passes the model through. The subtlety that makes it two nodes: hooks fire during sampling, which happens after a node's function returns. So the calibrator sets up the capture at graph-build time, and its downstream partner - placed after the sampler - actually writes the result to disk.

The inputs

Required: model, plus two that define the bucket:

  • output_path - where the accumulated mask lands (default calib/override_agree.safetensors). Use a distinct path per condition - the whole workflow is about comparing conditions, and mixing buckets ruins the comparison.
  • condition_label - free-form metadata (default "agree") stored in the output file so you can tell pools apart.

Optional and genuinely useful:

  • target_filter - regex for which modules to capture (default (attn1|ff\.net|proj_out|to_gate_logits)).
  • exclude_filter - regex to skip matched modules. The tooltip makes the canonical case: attn1 also matches audio_attn1, so exclude audio_ to stay video-only.
  • reset (False) - set True on the first prompt of a pool only, to clear the bucket before accumulating.
  • max_targets - caps how many modules get captured.

Outputs: model (the patched model - wire it to your sampler) and report (a STRING with diagnostics, handy for a text-preview node).

The workflow it enables

The author's own playbook runs two contrast axes. The override axis: point one path at override_agree.safetensors and queue your AGREE prompts (DMD loaded), then a second path for CONFLICT prompts - each with reset=True on its first prompt. The difference of those masks tells you which directions matter for the disagreement. The DMD axis is a diagnostic sanity check: same prompt, DMD on vs off, written to dmd_on/dmd_off paths. Downstream, outlier_dampen.py differences the masks and weights its winsorization by per-direction activation.

Honest caveats: accumulation runs on CPU in float32 (a few MB total, deliberately kept off VRAM), and the current version accumulates over the whole sample - zone-aware bucketing (early structure steps vs late refinement) is a planned refinement, not shipped. If you're not doing spectral-compression research on LTX, this pair is more tool than toy; if you are, it's the missing behavioral axis that weight-space analysis alone can't give you.

Install is the pack-wide clone (10S_Nodes into custom_nodes, restart, or ComfyUI Manager β†’ "10S-Comfy-nodes"), no extra deps. LTX2-class models only, as with everything in the pack.

Category10S Nodes/Calibration

Inputs (7)

NameTypeDefaultDescription
modelMODELβ€”
output_pathSTRINGcalib/override_agree.safetensorsBucket/file this pool accumulates into. Use a distinct path per condition (agree/conflict/dmd_on/dmd_off).
condition_labelSTRINGagreeFree-form label stored in metadata.
target_filteroptSTRING(attn1|ff\.net|proj_out|to_gate_logits)Regex; a module is captured if its dotted path matches. Note 'attn1' also matches 'audio_attn1' β€” use exclude_filter to drop the audio stream.
exclude_filteroptSTRINGRegex; modules whose path matches are skipped even if target_filter matched. E.g. 'audio_' for video-only, or 'to_gate_logits' to drop gates.
resetoptBOOLEANfalseClear this path's accumulator before this pass. Set True on the FIRST prompt of a pool only.
max_targetsoptINT20001–20000β€”

Outputs (2)

NameTypeDescription
modelMODELβ€”
reportSTRINGβ€”