LingBot Lazy Image Switch
Pick a branch without paying for the branch you didn't take
- original
- processed
- images
LingBotLazyImageSwitch is a tiny 2-to-1 image switch, and the whole point of it is the word "lazy" in the name. It takes an original image and a processed image, plus a boolean enabled, and outputs one of them. The trick: its image inputs are marked lazy, which means ComfyUI only evaluates the branch you actually select. If enabled is false, the whole expensive "processed" branch never runs. If it's true, the original branch is skipped.
In the pack's published workflows this node sits right after VAE decode, selecting between the raw video frames and the post-processed ones (RIFE interpolation / FlashVSR upscaling). The toggle-able enable_rife and enable_flashvsr booleans in LingBotPostProcessSettings drive the enabled input. When you have both post-processors turned off - the shipped default - you want the graph to not run them at all, not just ignore their output. A stock ComfyUI switch node still executes both upstream branches; this one genuinely doesn't. On a 16 GB card where VAE decode is a VRAM spike, that's the difference between a snappy smoke test and watching the GPU grind through work you explicitly disabled.
What's here
Inputs:
- enabled (boolean, default false) - pick
processedwhen true,originalwhen false. - original - the unprocessed IMAGE branch.
- processed - the post-processed IMAGE branch.
Output: a single images IMAGE.
Nothing else. It's deliberately dumb - that's its virtue. The check_lazy_status logic only requests the input that's actually needed for the chosen output, so the disabled upstream chain (FlashVSR model load, RIFE flownet load, the upscale itself) is pruned from execution entirely.
Install
Same pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ALX-CODE/lingbot-video-1.3b-fp8
pip install -r requirements.txt
or ComfyUI Manager → search "LingBot" → restart. No model dependencies of its own - it's just an image router.
Gotchas
- Lazy inputs only work if the upstream is lazy-compatible. ComfyUI's lazy evaluation protocol requires the upstream node to support it; standard ComfyUI nodes generally do, but a handful of custom nodes don't implement
check_lazy_statusand will execute anyway, quietly defeating the purpose. - If you want to force a branch to run for benchmarking (e.g. time RIFE while the switch says disabled), this node won't help - it's a switch, not a "run both" splitter. The pack's LatentSink is the better benchmarking companion.
- The output type is a plain
IMAGE, so you can use this node outside LingBot graphs entirely - it's the pack's contribution to the eternal "lazy image switch" genre, and a reasonable one if you don't already run a larger utilities pack. - Watch the direction of
enabled: false = original, true = processed. It reads naturally, but if your post-processed output is mysteriously showing up when you turned post off, check whether something upstream is feeding the boolean in inverted.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | false | — |
| original | IMAGE | — | |
| processed | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |