Nodes/PG Nodes/Checkpoint Switch
ComfyUI Node

Checkpoint Switch

A/B two full model stacks with one boolean

By GizmoR13·Created 11 months ago·Updated 11 months ago· 16
Checkpoint Switch
  • model_a
  • clip_a
  • vae_a
  • model_b
  • clip_b
  • vae_b
  • MODEL
  • CLIP
  • VAE
a_true

Comparing two checkpoints is a chore in stock ComfyUI because a checkpoint isn't one thing - it's a MODEL, a CLIP, and a VAE that travel together. Switch just the model and you're still encoding with the wrong text encoder. PgCpSwitch treats the triplet as the unit it actually is: feed it set A and set B, flip a_true, and the matching MODEL/CLIP/VAE trio flows out the other side.

This is the "keep one workflow, swap the base" node. Instead of maintaining two graphs or frantically rewiring a loader every time you want to compare DreamShaper against an Illustrious merge, you wire both checkpoint loaders into the switch and use a boolean to pick. Toggle it from a Primitive node, or wire it to anything else that produces a boolean - that's why the input is forced (the node requires a wired boolean rather than a plain checkbox), so a widget, a frontend toggle, or another node can drive it.

How it works

It's a pure router with no model logic. All six inputs are required: model_a, clip_a, vae_a and model_b, clip_b, vae_b. When a_true is true it returns set A; otherwise set B. Nothing is loaded, merged, or modified - both triplets must already exist upstream as loaded objects, which means both loaders run on every queue. That's worth knowing: if you're on a slow drive, both checkpoints get read each run even though only one is used. For A/B testing that's the price of convenience.

Inputs and outputs

  • model_a / clip_a / vae_a - triplet A.
  • model_b / clip_b / vae_b - triplet B.
  • a_true - the switch. Boolean, forceInput, so it must come from a wire.
  • Outputs MODEL, CLIP, VAE - the selected triplet, wired downstream exactly where your usual loader outputs go.

Install

Ships in PG Nodes: ComfyUI Manager → "PG Nodes" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/GizmoR13/PG-Nodes

No models or dependencies to download.

Common issues

The "both loaders run" behavior is the one that surprises people - watch your VRAM if both checkpoints are large. And because the VAE travels with the switch, a workflow that uses a different VAE for one of the checkpoints can't express that here; you'd want a VAE-only switch downstream instead. Also note this switches loaded objects, not files: change the checkpoint filename in the upstream loader, not in the switch. It's a dumb, reliable utility - that's the whole appeal.

CategoryPG/Utils

Inputs (7)

NameTypeDefaultDescription
model_aMODEL
clip_aCLIP
vae_aVAE
model_bMODEL
clip_bCLIP
vae_bVAE
a_trueBOOLEAN

Outputs (3)

NameTypeDescription
MODELMODEL
CLIPCLIP
VAEVAE