Checkpoint Rotation (Batch)
The 'Batch' rotation node that secretly isn't per-batch
- model
- clip
- vae
- info
The main event - and its one big lie
This is the node the pack's author marks with a star: Checkpoint Rotation (Batch) is the recommended way in, and it's genuinely the smoothest of the loaders to set up. You wire a counter into it, pick how often to change, and it rotates through your checkpoints. But the display name contains the trap that trips up just about everyone on first use: "Batch" here does not mean it rotates per image inside a batch.
Read that twice. ComfyUI executes this loader once per queue, loads one checkpoint, and the KSampler renders every image in that queue with it - batch_size: 20 in one queue gets you 20 images from one model, not twenty from twenty. The pack's own research notes spell this out in black and white: with batch generation, "All images use checkpoint_1 (even though counter changed)." The name is describing the counter's behavior, not the model switching.
What it actually does
The setup is the unusual part, because there's no counter inside the node. The counter input's tooltip gives you the recipe: "Connect a Primitive INT with 'control_after_generate: increment'." So:
- Right-click the
counterinput → Convert to input. - Add a Primitive INT, connect it to
counter. - Double-click the left side of the primitive and set
control_after_generatetoincrement.
That primitive's increment fires after each queue completes - so with a single-image workflow queued N times, the counter ticks up once per image and the rotation works. Loop-based generation does the same thing per iteration. The math is the pack's standard formula: checkpoint_index = (counter // change_every) % num_checkpoints, where the counter is normalized by an internal offset that powers the reset feature.
The reset_on_next toggle is a small lifesaver and a footgun at once: flip it on and the node records your current counter as an offset, so the next generation starts back at checkpoint 1 instead of continuing the cycle. The catch, printed in the console in all caps, is that you must flip it back off after that run - leave it on and it keeps re-anchoring the offset every generation.
Inputs and outputs that matter
- counter (INT) - the Primitive with
increment, as above. This is the whole game. - subfolder - checkpoint folder relative to
models/checkpoints/; empty for root. - change_every - images per checkpoint, default 4.
- reset_on_next (boolean) - the reset-to-start toggle, sticky by design.
Outputs are the standard model / clip / vae plus an info string that helpfully reports "Next change at image #N" so you can see where the cycle is heading. There's no checkpoint_name output on this one - the pack expects you to pair it with Save Image (with Checkpoint Info)'s own wiring, or use the debug loader if you need the name as a string.
The workflow you actually want
[Loop Start: N iterations] → [CheckpointRotationWithCounter]
→ [KSampler batch_size=1] → [SaveImageWithCheckpoint] → [Loop End]
KSampler batch_size: 1 is non-negotiable, and you need a loop (the pack's notes point at the ComfyUI-Loop extension) or a queued-batch approach. If your images aren't changing checkpoints, nine times out of ten it's a batch-size or no-loop problem, not a node problem.
Install
cd ComfyUI/custom_nodes/
git clone https://github.com/trunksn1/comfyui-change-checkpoint-randomly
Restart ComfyUI, watch for the green Checkpoint Rotation Node loaded successfully! message. No requirements.txt, no pip installs, no model downloads - just ComfyUI plus at least two checkpoints. It lives under Add Node → loaders → Checkpoint Rotation (Batch).
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| counter | INT | 00–100000 | Connect a Primitive INT with 'control_after_generate: increment' |
| subfolder | STRING | Checkpoint subfolder name (leave empty for root) | |
| change_every | INT | 41–1000 | Change checkpoint every N images |
| reset_on_next | BOOLEAN | false | Enable this to reset counter to 0 on next generation, then disable it |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| vae | VAE | — |
| info | STRING | — |