Nodes/ComfyUI-Model-Bending/Attention Map Capture (Experimental)
ComfyUI Node

Attention Map Capture (Experimental)

Records the cross-attention maps of chosen prompt tokens (head mean, first conditional sample) for every step and chosen block while a sampler runs, after any upstream attention bends. Read them as video frames with 'Read Attention Maps'. Experimental: validated only on tiny random-weight WAN models in the test suite, not yet on real video model weights.

By abuzreq·Created 2 years ago·Updated 2 days ago· 23
Attention Map Capture (Experimental)
  • model
  • clip
  • MODEL
  • attention_maps
  • report
◄attentioncross_text►
◄blocks13-18►
◄tokensprompt►
◄steps*►
◄heads*►
◄prompt►
◄strictfalse►
Categorymodel_bending/video (experimental)

Inputs (9)

NameTypeDefaultDescription
modelMODEL—
attentionCOMBOcross_text2 options: cross_text, cross_image
blocksSTRING13-18Blocks to record, e.g. '13-18'
tokensSTRINGpromptTokens to record: prompt words 'horse' (needs clip + prompt), indices '0-3', or 'prompt' (each prompt token, at most 32)
stepsoptSTRING*Sampling steps to record
headsoptSTRING*—
clipoptCLIP—
promptoptSTRING—
strictoptBOOLEANfalse—

Outputs (3)

NameTypeDescription
MODELMODEL—
attention_mapsATTENTION_MAPS—
reportSTRING—