Nodes/IAMCCS-nodes/IAMCCS Cine Stage 2 Bypass Switch
ComfyUI Node

IAMCCS Cine Stage 2 Bypass Switch

Pick which stage's latents get decoded, without a graph cycle

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
IAMCCS Cine Stage 2 Bypass Switch
  • stage1_audio_latent
  • stage1_video_latent
  • stage2_audio_latent
  • stage2_video_latent
  • audio_latent
  • video_latent
  • report
use_second_stagetrue

The IAMCCS SuperNode pipeline can run a two-stage generation: a first stage that produces the core video and audio latents, and a second stage that refines or upscales them. The problem with offering that as a switch is ComfyUI's execution model - a normal switch node forces both inputs to be computed, so bypassing stage 2 wouldn't actually save you anything. Stage 2 Bypass Switch solves that the right way: it's a lazy switch that only requests the latents from the stage you actually selected.

The tooltip on use_second_stage tells you exactly what the toggle means: "True: decode Stage 2 output. False: bypass Stage 2 and decode Stage 1 output." It's a before-decode router - the latents it outputs are meant to feed your decode step.

How it works. The four optional inputs are stage1_audio_latent, stage1_video_latent, stage2_audio_latent, and stage2_video_latent, all LATENT and all marked lazy. ComfyUI asks the node which inputs it actually needs via check_lazy_status: with use_second_stage on, it requests only the stage-2 latents; with it off, only the stage-1 latents. The upstream stage that isn't needed never executes. Then switch returns the chosen pair.

The outputs. audio_latent and video_latent (the selected stage's pair, ready for decode) plus a report JSON that records which stage was selected ("selected": "stage2" or "selected": "stage1_bypass"). It also raises a clear error if you enable a stage whose latents aren't connected - you get "Stage 2 is enabled, but Stage 2 latents are not connected," which beats a silent black-frame mystery.

Where it fits. Wire stage 1 and stage 2 latents into the switch, then the switch into your VAE decode. Toggle use_second_stage to A/B the two stages without rewiring anything. Because the request is lazy, you can also leave stage 2 unconnected and the graph still runs in bypass mode.

Install. Part of IAMCCS-nodes: ComfyUI Manager (search "IAMCCS"), or git clone https://github.com/IAMCCS/IAMCCS-nodes into custom_nodes, restart. No models, no heavy dependencies - the heavy lifting is in the stages you connect to it.

Gotchas. If you enable the second stage without connecting its latents, it errors by design - connect before toggling. And the lazy behavior only works because this node asks for inputs on demand; don't replace it with a generic switch, because a regular switch will eagerly compute both stages and quietly eat your VRAM. For one-stage pipelines, just leave use_second_stage off and skip this node entirely.

CategoryIAMCCS/Cine/02 Single Generation

Inputs (5)

NameTypeDefaultDescription
use_second_stageBOOLEANtrueTrue: decode Stage 2 output. False: bypass Stage 2 and decode Stage 1 output.
stage1_audio_latentoptLATENT
stage1_video_latentoptLATENT
stage2_audio_latentoptLATENT
stage2_video_latentoptLATENT

Outputs (3)

NameTypeDescription
audio_latentLATENT
video_latentLATENT
reportSTRING