Nodes/h4 ToolKit/h4 : Debug-a-Tron-3000 (v2.1.0)
ComfyUI Node

h4 : Debug-a-Tron-3000 (v2.1.0)

A tap node that actually tells you what's in the wires

By m3rr·Created 11 months ago·Updated 2 months ago· 0
h4 : Debug-a-Tron-3000 (v2.1.0)
  • model_in
  • clip_in
  • clip_vision_in
  • vae_in
  • conditioning_in
  • conditioning_positive_in
  • conditioning_negative_in
  • latent_in
  • image_in
  • mask_in
  • Model
  • CLIP
  • CLIP_Vision
  • VAE
  • Conditioning
  • Positive
  • Negative
  • Latent
  • Image
  • Mask
modepassthrough
go_ultrafalse
ultra_capture_first_steptrue
ultra_capture_mid_stepfalse
ultra_capture_last_steptrue
ultra_preview_imagestrue
ultra_json_logtrue
ultra_highlight_missing_conditioningtrue
ultra_token_previewfalse
ultra_latent_anomaly_checkstrue
ultra_model_diff_trackingfalse
ultra_watch_expression
ultra_cache_artifactstrue

Every ComfyUI user eventually hits the same wall: the graph ran, nothing errored, and the image is wrong, but you have no idea what your conditioning or latent actually looked like mid-pipeline. There are reroute nodes, there are primitive viewers, and then there's the Debug-a-Tron 3000 - a node whose whole personality is "let me look at that wire for you." It sits inline in your graph, mirrors every payload type it can accept, and writes a structured log to the console describing what came through: tensor shapes, dtype, device, min/max/mean/std, and conditioning previews.

It's part of the h4 ToolKit, a small pack with zero search impressions that the author has openly shelved in favor of a successor. Don't let that scare you off - the debug tools are the pack's best-written code, and the README documents them to an almost unreasonable depth. You're an early adopter; file a GitHub issue if something bites.

Monitor vs passthrough

The one required widget is mode, and it's the first thing to understand:

  • monitor - logs everything but outputs None on every slot. Perfect for tapping into a pipeline without disturbing it.
  • passthrough - clones each inbound payload (type-aware deep copies, so upstream data never gets mutated) and forwards it downstream while logging.

Start in monitor to validate a graph, then flip to passthrough once you want the debugger living in the live path.

The slots

Everything is optional and typed: model_in, clip_in, clip_vision_in, vae_in, generic conditioning_in plus separated conditioning_positive_in/conditioning_negative_in, latent_in, image_in, mask_in. Leave a slot unconnected and it stays quiet - no noise. If you don't wire a VAE, the node tries to harvest one from the connected model, which is a nice touch when you just want a preview.

The ten outputs mirror the inputs - Model, CLIP, CLIP_Vision, VAE, Conditioning, Positive, Negative, Latent, Image, Mask - so the node is genuinely inline, not a dead-end probe.

GO PLUS ULTRA?!

The personality comes out when you flip go_ultra. The UI literally renames it " GO PLUS ULTRA?! " and physically removes the advanced widgets until you enable it. That toggle gates:

  • Latent snapshots (ultra_capture_first_step, _mid_step, _last_step) plus optional preview image decode when a VAE is present (ultra_preview_images).
  • Anomaly checks (ultra_latent_anomaly_checks) - scans for NaN/Inf and suspicious variance spikes. This is the one that catches a broken run before you stare at the output for ten minutes.
  • Conditioning gap warnings (ultra_highlight_missing_conditioning) - flags branches that are absent, the silent killer of CFG.
  • Model fingerprinting (ultra_model_diff_tracking) - hashes model/LoRA signatures so you can prove which weights were active.
  • A watch expression (ultra_watch_expression) - evaluate a Python expression against the payloads with torch and np available, e.g. torch.sqrt(latent_in['samples'].var()). It runs in a restricted sandbox with builtins blocked, so keep it boring.

Artifacts (JSON logs, previews) land under ComfyUI/temp/h4_debugatron_ultra/; ultra_cache_artifacts decides whether they survive or get treated as disposable diagnostics.

Install

Manager → search "h4 ToolKit", or:

cd ComfyUI/custom_nodes
git clone https://github.com/m3rr/h4_ToolKit

Restart. Deps are colorama and numpy, auto-installed on startup; no models to download.

Troubleshooting

  • Previews missing - you need a VAE reachable, either wired or harvestable from the model. If artifact caching is off, expect previews to be ephemeral.
  • Watch expression errors - the sandbox blocks __builtins__; the exception gets echoed to the console.
  • Warning noise about conditioning - that's the feature doing its job; check upstream wiring rather than silencing it.
Categoryh4 Toolkit/Debug

Inputs (23)

NameTypeDefaultDescription
modeCOMBOpassthrough2 options: monitor, passthrough
model_inoptMODELConnect any diffusion model blob to inspect or forward downstream.
clip_inoptCLIPAttach a CLIP text encoder payload for logging and pass-through.
clip_vision_inoptCLIP_VISIONOptional CLIP vision encoder payload.
vae_inoptVAESupply a VAE instance for inspection or passthrough.
conditioning_inoptCONDITIONINGGeneric conditioning list or bundle.
conditioning_positive_inoptCONDITIONINGPositive conditioning branch when separated upstream.
conditioning_negative_inoptCONDITIONINGNegative conditioning branch when separated upstream.
latent_inoptLATENTLatent dictionary (samples / noise etc.).
image_inoptIMAGEImages or batches headed into the debugger.
mask_inoptMASKMask tensor payloads to monitor or route.
go_ultraoptBOOLEANfalseFlip the switch marked GO PLUS ULTRA?! to open deep-dive logging, previews, and artefact capture.
ultra_capture_first_stepoptBOOLEANtrueCapture analytics for the earliest latent frame observed (or current latent when history is unavailable).
ultra_capture_mid_stepoptBOOLEANfalseWhen latent history is provided, also analyse the midpoint frame for drift checks.
ultra_capture_last_stepoptBOOLEANtrueCapture analytics for the most recent latent frame to spot end-of-run anomalies.
ultra_preview_imagesoptBOOLEANtrueAttempt to decode the analysed latent into a quick preview image when a VAE is connected.
ultra_json_logoptBOOLEANtrueSerialise the captured diagnostics to a JSON file under ComfyUI's temp directory for later comparison.
ultra_highlight_missing_conditioningoptBOOLEANtrueWarn when positive/negative or auxiliary conditioning branches are absent to prevent silent misconfigurations.
ultra_token_previewoptBOOLEANfalseAttempt to echo prompt fragments and key embedding stats for the first few conditioning entries.
ultra_latent_anomaly_checksoptBOOLEANtrueScan tensors for NaN/Inf values and suspicious variance spikes to surface stability issues early.
ultra_model_diff_trackingoptBOOLEANfalseHash model and LoRA parameter signatures so you can verify which weights were active this run.
ultra_watch_expressionoptSTRINGEvaluate a Python expression against the inbound payloads (available globals: torch, np, slot names). Leave blank to disable.
ultra_cache_artifactsoptBOOLEANtrueKeep generated preview images and JSON logs on disk instead of treating them as temporary diagnostics.

Outputs (10)

NameTypeDescription
ModelMODEL
CLIPCLIP
CLIP_VisionCLIP_VISION
VAEVAE
ConditioningCONDITIONING
PositiveCONDITIONING
NegativeCONDITIONING
LatentLATENT
ImageIMAGE
MaskMASK