Nodes/MD Nodes/MD: Latent Visualizer
ComfyUI Node

MD: Latent Visualizer

A ComfyUI node in MD_Nodes/Debugging & Visualization with 26 inputs and 1 output.

By MDMAchine·Created about a year ago·Updated 2 months ago· 14
MD: Latent Visualizer
  • latent
  • latent_compare
  • image
modewaveform
channel0
batch_index0
normalizetrue
width512
height256
gridtrue
bg_color#0D0D1A
waveform_color#87CEEB
spectrum_color#FF00A2
rgb_r_color#FF3333
rgb_g_color#00FF8C
rgb_b_color#3399FF
axis_label_color#A0A0B0
grid_color#303040
all_modesfalse
log_scalefalse
show_statsfalse
detect_peaksfalse
peak_threshold0.50
line_stylesolid
line_alpha1.0
multi_channel_count3
colormapviridis
CategoryMD_Nodes/Debugging & Visualization

Inputs (26)

NameTypeDefaultDescription
latentLATENTLATENT INPUT • Purpose: The latent tensor dictionary to visualize. • Accepts: Standard ComfyUI Latent format. • Output: Generates an image plot based on this data.
modeCOMBOwaveformVISUALIZATION MODE • Purpose: Select the type of analysis to perform. • Options: - waveform: Amplitude over spatial dimension. - spectrum: Frequency magnitude (FFT). - rgb_split: Overlay first 3 channels. - heatmap: 2D spatial representation. - histogram: Value distribution. - statistics: Mean/Std across channels. - difference: Compare two latents. ⭐ Recommended: 'waveform' for basic checks.
channelINT0CHANNEL INDEX • Purpose: Target specific latent channel for 1D modes. • Range: 0 to (Max Channels - 1). ⭐ Recommended: 0
batch_indexINT0BATCH INDEX • Purpose: Target specific image/audio in a batched latent. • Range: 0 to (Batch Size - 1). ⭐ Recommended: 0
normalizeBOOLEANtrueNORMALIZE SIGNAL • Purpose: Rescale amplitudes to [0, 1] range for easier viewing. • Trade-offs: Makes tiny signals visible, but hides true absolute magnitude. ⭐ Recommended: True
widthINT51264–2048PLOT WIDTH • Purpose: Output image width in pixels. • Range: 64 to 2048. ⭐ Recommended: 512
heightINT25664–2048PLOT HEIGHT • Purpose: Output image height in pixels. • Range: 64 to 2048. ⭐ Recommended: 256
gridBOOLEANtrueDISPLAY GRID • Purpose: Show background grid lines for visual reference. ⭐ Recommended: True
bg_colorSTRING#0D0D1ABACKGROUND COLOR • Valid Hex Code (e.g., #0D0D1A)
waveform_colorSTRING#87CEEBWAVEFORM COLOR • Valid Hex Code (e.g., #87CEEB)
spectrum_colorSTRING#FF00A2SPECTRUM COLOR • Valid Hex Code (e.g., #FF00A2)
rgb_r_colorSTRING#FF3333RED CHANNEL COLOR • Valid Hex Code
rgb_g_colorSTRING#00FF8CGREEN CHANNEL COLOR • Valid Hex Code
rgb_b_colorSTRING#3399FFBLUE CHANNEL COLOR • Valid Hex Code
axis_label_colorSTRING#A0A0B0AXIS LABEL COLOR • Valid Hex Code
grid_colorSTRING#303040GRID COLOR • Valid Hex Code
all_modesBOOLEANfalseRENDER ALL MODES • Purpose: Stacks all applicable visualization modes into one large image. • Trade-offs: Slower generation, very tall output image. ⭐ Recommended: False
log_scaleBOOLEANfalseLOGARITHMIC SCALE • Purpose: Use Log (dB) scale for Spectrum and Histogram Y-axis. ⭐ Recommended: False (unless analyzing audio)
show_statsBOOLEANfalseSHOW STATISTICS • Purpose: Overlay Mean, Std, Min, Max values on the plot. ⭐ Recommended: True for debugging
detect_peaksBOOLEANfalseDETECT PEAKS • Purpose: Marks local maxima on Waveform/Spectrum plots. • Requirement: Requires Scipy installed in python env. ⭐ Recommended: False
peak_thresholdFLOAT0.500–1PEAK THRESHOLD • Purpose: Minimum relative height (0-1) for a point to be considered a peak. ⭐ Recommended: 0.5
line_styleCOMBOsolidLINE STYLE • Purpose: Visual style of the plot lines.
line_alphaFLOAT1.00.1–1LINE OPACITY • Purpose: Transparency of the plot lines.
multi_channel_countINT31–16MULTI-CHANNEL COUNT • Purpose: Number of channels to render in 'multi_channel' mode.
colormapCOMBOviridisCOLORMAP • Purpose: Gradient used for Heatmap mode.
latent_compareoptLATENTLATENT COMPARE • Purpose: Second latent tensor required for 'difference' mode. • Requirement: Must match dimensions of primary latent.

Outputs (1)

NameTypeDescription
imageIMAGE