Checkpoint Rotation (Debug)
The rotation loader that shows its working
- model
- clip
- vae
- checkpoint_name
- debug_info
The one you turn to when rotation "just isn't working"
Checkpoint Rotation (Debug) is the pack's transparent loader, and the display name is honest about its purpose. It takes a raw checkpoint_index, does the rotation arithmetic in the open, and hands you a debug_info string that spells out every step of the calculation. When your rotated batch is producing the same model over and over and you've run out of guesses, this node tells you in plain text whether the loader is even executing, let alone which checkpoint it picked.
It's not the node you build your production workflow on - it's the diagnostic you reach for to understand the machine. And for a beginner, that's genuinely the fastest way to learn how checkpoint rotation works, because every intermediate value is on screen.
How it works
You feed it a checkpoint_index - the tooltip's recipe is a Primitive INT with control_after_generate: increment - plus a subfolder and change_every. Inside, it computes:
actual_checkpoint = (checkpoint_index // change_every) % num_checkpoints
which is the same (index // N) % count formula every node in this pack uses, just with the inputs exposed. Feed it an index that increments once per image and change_every: 4, and it picks checkpoint 0 for images 0–3, checkpoint 1 for 4–7, and so on.
The detail that makes it a debug tool: IS_CHANGED returns the raw checkpoint_index, and on every execution it prints >>> NODE EXECUTING with index=N to the console. The single most common "rotation is broken" cause is a loader that never re-runs because its input didn't change - this node makes that failure obvious. If you see the print line but the model doesn't change, the problem is upstream; if you don't see the print line at all, the node isn't executing, and no amount of checkpoint shuffling will fix that.
Inputs and outputs
- checkpoint_index (INT) - the driver, from a Primitive with
increment. The tooltip names this exact setup. - subfolder - empty for root
models/checkpoints/, or a relative path. - change_every - images per checkpoint, default 4.
Outputs are the standard model / clip / vae, plus checkpoint_name (the relative path string, useful for wiring into this pack's saver) and debug_info. The debug string is the payoff: it reports the raw index, the change interval, the computed checkpoint index, the total count, where you are in the current cycle, and the actual file selected. Drop debug_info into a text display node and you can watch the rotation live.
Where it fits
Think of the pack as a progression: Simple Checkpoint Rotation hides everything, Checkpoint Rotation (Batch) hides most things, this one hides nothing. I'd use it to confirm my loop setup is actually ticking, then swap it for the Batch node once the arithmetic checks out. It's also the only loader here that lets you see the exact index math, which is worth keeping around as a teaching aid.
Install
Standard pack install:
cd ComfyUI/custom_nodes/
git clone https://github.com/trunksn1/comfyui-change-checkpoint-randomly
Restart ComfyUI and look for the Checkpoint Rotation Node loaded successfully! console line. No pip dependencies or model downloads - just ComfyUI and at least two checkpoints to rotate through. It's under Add Node → loaders → Checkpoint Rotation (Debug).
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| checkpoint_index | INT | 00–100000 | Connect Primitive INT with control_after_generate: increment |
| subfolder | STRING | Checkpoint subfolder (leave empty for root) | |
| change_every | INT | 41–1000 | Change checkpoint every N images |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| vae | VAE | — |
| checkpoint_name | STRING | — |
| debug_info | STRING | — |