Enable Latent (CRT)
Enable Latent (CRT)
- latent
- LATENT
Enable Latent (CRT) is a gate. It takes a LATENT in, checks a boolean called enable, and either passes the latent straight through or hands the graph a None. That's the entire job, and it's one of those tiny nodes you don't miss until you're staring at a template workflow with a branch you can't switch off.
The obvious use is toggling an optional second pass. Say you've built an img2img loop that feeds a latent into a sampler - sometimes you want it active, sometimes you want to bypass it. Instead of muting a whole group or unplugging wires, you flip enable to False and the latent chain just dies. It's the latent equivalent of a bypass toggle, with the difference that it applies mid-pipeline, to whatever latent value is flowing through it, not to a node group.
Mechanically it's about as simple as it gets. When enable is on it returns the latent dict untouched - same samples, same shapes, nothing re-encoded. When it's off it returns None and logs a warning to the console. It's also defensive about garbage input: a None in either side returns None rather than crashing, which makes it safe to drop into a chain that might legitimately receive an empty value.
The one input that matters is latent (the thing you want to gate) and the boolean enable - that's it. The single output, LATENT, plugs into any node expecting latents: a KSampler's latent port, a Latent Upscale, a VAE decode, a ReferenceLatentBatch if you're on the FLUX.2 edit-model train. If you're building batch or loop workflows you'll sometimes use a pair of them to switch between two latent sources with one control value.
The gotcha to remember: when it outputs None, whatever it feeds must tolerate None. ComfyUI treats a None result as a missing connection, so if you gate a required input of a downstream node and then disable the node, that node will error out. Gate inputs that are optional, or design the downstream path to handle the empty case (a Mask Pass or Placeholder, or a node that already handles None gracefully, like Load Last Latent (CRT)).
Install it with the rest of CRT-Nodes: ComfyUI Manager → search "CRT-Nodes", or git clone https://github.com/plugcrypt/CRT-Nodes.git into custom_nodes and restart. No model downloads, no hidden dependencies - this node uses nothing beyond core ComfyUI. If the pack's heavier requirements (ultralytics, librosa, whisper) make you nervous, that's fine: this node is pure pass-through and only needs the pack to load.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| enable | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |