Nodes/ComfyUI-CCXManager/Node Version Switcher
ComfyUI Node

Node Version Switcher

Roll back any custom node to the last version that worked

By WWWEN8·Created about a year ago·Updated 7 months ago· 6
Node Version Switcher
    • Result Message
    node_name
    version_offset1
    show_historyfalse

    The third reason you'll keep this pack around. Beyond updating sd-ppp, WWWEN8's ComfyUI-CCXManager ships a "Node Version Switcher" that fixes a very specific, very common ComfyUI pain: a custom node updates, and the update breaks your workflow. It's the "undo" button for git pull. Point it at any git-installed node and it'll hop that node's code to an older commit - or back to latest - without you touching a terminal.

    How it works

    The node assumes your custom node is a git clone (no .git folder, no dice). It runs, in order: git fetch and git pull to make sure it has the latest history, then checks out a temporary branch at the target commit, then reset --hard back onto your original branch at that commit. If you had uncommitted changes sitting in the node's folder, it stashes them first and tells you about it in the result message.

    The version math is the clever (and counterintuitive) part. version_offset = 1 means latest - think "the newest is offset 1 from the top". Negative numbers walk backward from the top: -1 is the previous release, -2 the one before that. Zero is rejected outright. So if the latest sd-ppp update just bricked your setup, you set version_offset to -1, run, restart, and you're on the last known-good version.

    The inputs

    • node_name - the folder name of the node inside ComfyUI/custom_nodes/ (e.g. sd-ppp). This is the one you'll actually type.
    • version_offset - 1 for latest, negative numbers to roll back N commits from latest. Range -99999 to 1.
    • show_history - flip it true and instead of switching versions it prints the node's commit history (short hash, author, date, message) to the Result Message output so you can see what you're rolling back to and pick an offset.

    Output is a single string, Result Message, with the new commit hash, message, and date - or an error if the switch failed.

    Setup

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WWWEN8/ComfyUI-CCXManager.git
    

    or ComfyUI Manager → "ComfyUI-CCXManager". Python deps are just requests; the real requirement is git on your PATH, which any git-installed custom node setup already has.

    Gotchas

    This node does a reset --hard on someone else's code, which is a power tool. Local edits get stashed (and mentioned in the result), but anything the reset can't handle will fail loudly with a message like "Failed to switch to target commit" - read the error before retrying with a different offset. Two more things to know: after switching you need to restart ComfyUI for the node to actually reload at the new version, and version numbers here are commits, not semantic versions - if the author made six commits in a day, -1 takes you back one commit, not one release. When in doubt, use show_history first and count. And if you ever upgrade ComfyUI and a node that "worked fine" stops working, roll-back-to-latest with version_offset = 1 is usually the fix before you go hunting for the newer API.

    CategoryUpdate of SD-PPP Plugin

    Inputs (3)

    NameTypeDefaultDescription
    node_nameSTRING
    version_offsetINT1-99999–1
    show_historyBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    Result MessageSTRING