Nodes/LTX-2 Microscope/LTX2 Microscope
ComfyUI Node

LTX2 Microscope

See Inside LTX-2's 48 Layers While It Samples

By dorpxam·Created 4 months ago·Updated 4 months ago· 5
LTX2 Microscope
  • model
  • model
view_modeconditioning
norm_mode
colormapcividis
maintain_aspect_ratiotrue
show_index_labelstrue
animation
ui_statusnone
ui_containernone
ui_buttonnone

LTX-2 Microscope is a live X-ray for the LTX-2 video transformer. Drop it into any workflow that's running Lightricks' 19B (or 22B 2.3) model and it shows you the hidden state after every one of the model's 48 transformer layers, updating in real time as sampling runs. If you've ever stared at a garbage video and wondered "is this a dead layer, a prompt problem, or the sampler fighting itself?" - this is the tool that answers that instead of guessing.

A quick honesty check up front: this is a diagnostic, not a production node. It's version 0.1.0, tagged MXP/Experimental, and its job is to make the model legible. You won't leave it in your final workflow; you'll add it when something's wrong, watch the grid, then delete it. That's fine. That's what it's for.

How it works

Under the hood it does something genuinely clever. The node takes your MODEL, clones it, and patches the forward method of each diffusion_model.transformer_blocks.{0..47} block so that every block's output gets detach-cloned to CPU and handed to a background broadcaster thread. That thread bundles the 48 tensors per sampling step and pushes them to the frontend over a websocket (ltx2_sampling_update), while a wrapped sampler callback forwards step count and latent shape metadata alongside.

The upshot: an 8x6 grid on the node itself, one tile per layer, rendered live via the canvas. Because LTX-2 runs classifier-free guidance, the positive and negative paths both flow through, which is where the three view modes come in:

  • conditioning - the CFG positive path
  • unconditioning - the negative path
  • differential - the subtraction, i.e. what the model is actually steering toward

That last one is the interesting view. Diffusion is the noise-minus-guidance story; seeing the residual per layer tells you where the signal is actually being sculpted and where layers are coasting.

Inputs and outputs that matter

Only one real connection: model in, model out. The output is your same model (patched), so wire it exactly where the original would have gone - straight into your KSampler / LTX sampler. The rest are mostly UI knobs on the node itself:

  • view_mode - conditioning / unconditioning / differential, above.
  • norm_mode - how each tile maps values to color. min_max takes explicit Min/Max values (defaults 400/700 - these are raw hidden-state magnitudes, so expect to fiddle), z_score is per-layer standardization, percentile cuts top/bottom percentages to kill hot spots. For a first look, z_score or percentile is usually more informative than raw min/max.
  • colormap - 11 perceptual maps (cividis is the default; inferno and magma look great).
  • maintain_aspect_ratio and show_index_labels - cosmetic; the latter labels each tile with its layer number.
  • animation - realtime loops through steps with FPS control and a freeze toggle; frame-by-frame gives you a slider to scrub a specific step. Great for watching noise organize into structure.

The ui_status, ui_button, and ui_container fields aren't things you set - they're socketless widgets the frontend repurposes as the status bar, RESET button, and the draw canvas. Yes, it's a hack. It works.

Installing

No model downloads, no heavy deps. The README says "no external dependencies," and the pyproject lists only pillow and opencv-python - both already present in any ComfyUI install, so you don't need to pip anything.

cd ComfyUI/custom_nodes
git clone https://github.com/dorpxam/ComfyUI-LTX2-Microscope

Restart ComfyUI. Or use ComfyUI Manager and search "LTX-2 Microscope." That's it - the node works with whatever LTX-2 checkpoint you already have loaded.

Gotchas

Two things to know. First, the README carries a warning in bold: not compatible with the Node 2.0 (UI) of ComfyUI. This node renders through a legacy canvas-monitor widget, so if you're on the newer frontend and the grid never appears, that's why - run it on the classic UI, and keep an eye on the repo for a 2.0-compatible update. Second, it costs something: 48 layers forwarding hidden states to CPU on every step is real overhead, and the patched model clone is heavier than a plain passthrough. On an already-VRAM-hungry LTX-2 workload (24GB+ to run comfortably, 32GB preferred), leave the microscope in for a few diagnostic runs, not for a long batch.

If the grid stops updating mid-run, hit the RESET button to clear the local buffer and return to idle. And remember the license while you're here: LTX-2 ships under the LTX-2 Community License - fine for personal use, but derivatives (including LoRAs you train on it) carry the same share-alike terms. The microscope doesn't change any of that; it just shows you the inside.

CategoryMXP/Experimental

Inputs (10)

NameTypeDefaultDescription
modelMODEL
view_modeCOMBOconditioning3 options: conditioning, unconditioning, differential
norm_modeCOMBO4 options: [object Object], [object Object], [object Object], [object Object]
colormapCOMBOcividis11 options: cividis, viridis, ghostlight, eclipse, navia, batlow, +5
maintain_aspect_ratioBOOLEANtrue
show_index_labelsBOOLEANtrue
animationCOMBO2 options: [object Object], [object Object]
ui_statusSTRINGnone
ui_containerSTRINGnone
ui_buttonoptSTRINGnone

Outputs (1)

NameTypeDescription
modelMODEL