ComfyUI Node
MD: NaN Guardian
A ComfyUI node in MD_Nodes/Debugging with 4 inputs and 1 output.
MD: NaN Guardian
- latents
- latents
◄actionGraceful Interrupt►
◄debug_mode0 - Silent►
◄enable_profilingfalse►
CategoryMD_Nodes/Debugging
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| latents | LATENT | INPUT LATENTS • Purpose: The latent tensor output from a sampler or encoder. • Range: Standard ComfyUI LATENT dictionary. • Trade-offs: Minimal performance overhead to pass through. ⭐ Recommended: Connect immediately after your main KSampler. | |
| action | COMBO | Graceful Interrupt | DEFENSE ACTION • Purpose: What to do when corrupted math (NaN/Inf) is detected. • Options: - Raise Hard Error: Halts queue and throws red UI error. - Graceful Interrupt: Safely halts (acts like clicking 'Cancel' in UI). - Zero Out (Rescue): Replaces corrupted tensors with zeros. ⭐ Recommended: Graceful Interrupt for unattended batch queues. |
| debug_mode | COMBO | 0 - Silent | LOGGING VERBOSITY • Purpose: Controls console output detail level. • Options: 0 (Silent), 1 (Basic Stats), 2 (Verbose Tracing). ⭐ Recommended: 0 for standard production runs. |
| enable_profiling | BOOLEAN | false | PERFORMANCE PROFILING • Purpose: Enable detailed tensor scan timing. • Note: Automatically enabled if debug_mode is 1 - Info or higher. ⭐ Recommended: False. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | — |