Nodes/ComfyUI illumorae/Checkpoint Random Selector
ComfyUI Node

Checkpoint Random Selector

Rotate checkpoints on a timer, on purpose

By CorvaeOboro·Created 8 months ago·Updated 5 days ago· 1
Checkpoint Random Selector
    • folder_path
    • file_path
    • filename
    base_folderD:/CODE/STABLEDIFFUSION_AUTO/models/Stable-diffusion
    categorySDXL
    interval_minutes60
    sdxl_folder_nameSDXL 10
    pony_folder_namePony
    sd15_folder_nameSD15
    safe_modetrue
    file_extensions.safetensors,.sft
    use_checkpoint_subfolderfalse
    checkpoint_subfolder_nameCheckpoint

    Most people want their checkpoint to stay put. Checkpoint Random Selector is for the rare person who wants it to wander - but wander deterministically. It picks a random checkpoint from a category of your choosing, and the pick is stable for a set interval. Every hour (or whatever you set), the choice rolls over to a new model. Same run to run within that hour, different model on the hour.

    Why would you want that? Two real uses. First, variation exploration: if you're running long batch queues and want your output to drift across a folder of checkpoints instead of staying locked to one style, this is the node. Second, if you're testing - "which of these 40 SDXL checkpoints gives me what I want?" - a rotation loop answers that question for you while you're not looking. It's the checkpoint side of the pack's whole randomization-for-exploration philosophy.

    How it works

    The key design decision is that the randomization is deterministic per interval, not per run. It hashes the current time bucket (category + the hour/minute block) into a seed, so the same model is picked for the whole interval no matter how many times the queue executes. That's why you don't get a different checkpoint every single generation - the node's IS_CHANGED only fires at interval boundaries, which is also how it stays ComfyUI-cache-friendly instead of dirtying the graph every step.

    The inputs you actually touch:

    • base_folder - root of your model folders. The default is D:/CODE/STABLEDIFFUSION_AUTO/models/Stable-diffusion, which is the author's Windows path. Change it to your own models/checkpoints folder or nothing will match.
    • category - SDXL, PONY, or SD15, and the three *_folder_name fields tell it which subfolder each category lives in. It defaults to assuming you've got folders named like SDXL 10, Pony, SD15.
    • interval_minutes - 1 to 1440, default 60.

    safe_mode (default on) restricts to .safetensors/.sft; file_extensions is the override when it's off.

    Outputs are strings, not a model: folder_path, file_path, and filename. That's the other gotcha - this node selects, it doesn't load. Wire the filename output into the pack's Checkpoint Loader By String Dirty (which does the loading and gives you model/clip/vae) to close the loop.

    Installing it

    Part of CorvaeOboro's ComfyUI_illumorae (CC0, pure code, no model downloads). ComfyUI Manager → search illumorae → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CorvaeOboro/ComfyUI_illumorae
    

    Common issues

    • "No checkpoint files found" - almost always the default base_folder pointing at a path that doesn't exist on your machine. Point it at your actual checkpoints directory.
    • It never changes. If interval_minutes is large you'll legitimately wait; but also remember it only rotates at interval boundaries - a run at 10:59 and a run at 11:00 are different models, two runs at 10:59 aren't.
    • Model choice feels wrong - the selection is random, but if your category folders are misconfigured you might be sampling from a folder with one file in it. Check the folder_path output once to confirm where it's actually looking.
    Categoryillumorae

    Inputs (10)

    NameTypeDefaultDescription
    base_folderSTRINGD:/CODE/STABLEDIFFUSION_AUTO/models/Stable-diffusion
    categorySTRINGSDXL
    interval_minutesINT601–1440
    sdxl_folder_nameSTRINGSDXL 10
    pony_folder_nameSTRINGPony
    sd15_folder_nameSTRINGSD15
    safe_modeoptBOOLEANtrue
    file_extensionsoptSTRING.safetensors,.sft
    use_checkpoint_subfolderoptBOOLEANfalse
    checkpoint_subfolder_nameoptSTRINGCheckpoint

    Outputs (3)

    NameTypeDescription
    folder_pathSTRING
    file_pathSTRING
    filenameSTRING