Nodes/XB_ToolBox/XB-BOX - Data Radar
ComfyUI Node

XB-BOX - Data Radar

A wire you can attach to see what your data weighs

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - Data Radar
  • model
  • latent
  • positive_cond
  • negative_cond
  • model
  • latent

Every once in a while you want to know exactly how much VRAM a generation step is about to eat before it eats it. That's this node: XB-BOX's "Data Radar" is a pass-through telemetry node. You wire it inline before the sampler, run the workflow, and it prints the sizes of everything you fed it to the ComfyUI console - your latent in megabytes, its shape, how much your conditioning weighs (including the hidden pooled/ControlNet/GLIGEN payloads), and your GPU's current allocated and reserved memory. Then it hands your data straight back, untouched. It's one of the pack's diagnostic tools, a sibling of the VRAM Calculator in the README's "predict your footprint" blurb.

How it works

scan_data() is pure inspection. It takes the latent tensor, multiplies element size by element count, and reports the result in MB along with the shape. For conditioning it walks each entry - summing the cross-attention tensor and, crucially, the dictionary payloads that carry heavy extras like pooled outputs, ControlNet features, and GLIGEN embeddings - then reports those totals in MB too. If CUDA is available it prints torch.cuda.memory_allocated and torch.cuda.memory_reserved in GB. Then it returns (model, latent) unchanged. No mutation, no side effects beyond the console output. Because it's a pass-through, you can drop it into an existing wire without changing anything about the graph's behavior.

The inputs

  • model and latent - required. These are the two heavy things you actually want measured.
  • positive_cond and negative_cond (optional) - wire your conditioning in if you want the conditioning-weight report; skip them and it still measures the latent and VRAM.

Outputs: model and latent - identical to what you put in, so downstream nodes behave exactly as if the radar weren't there.

Install

Pack install - ComfyUI Manager search XB_ToolBox, or git clone https://github.com/WJLUOXIAO/XB_ToolBox into custom_nodes, restart. That's the whole install: no model files, no wrapper, no extra dependencies. It's one of the rare XB nodes that works standalone.

Common issues

The realistic complaint is that it looks broken - nothing appears on the canvas, because the report goes to your ComfyUI terminal/console, not the UI. Check the terminal output after the run. Second: it measures what's in memory at the moment it runs, so put it right before the expensive step you're curious about, not at the start of a long chain. And if you expected a VRAM prediction for a model you haven't loaded yet, this isn't it - that's the separate VRAM Calculator node; this radar reports live data.

CategoryXB_ToolBox/VRAM_Hacks

Inputs (4)

NameTypeDefaultDescription
modelMODEL
latentLATENT
positive_condoptCONDITIONING
negative_condoptCONDITIONING

Outputs (2)

NameTypeDescription
modelMODEL
latentLATENT