Nodes/ComfyUI-HMT-Suite/Update Custom Nodes
ComfyUI Node

Update Custom Nodes

Update every custom node in one run — but only the git-managed ones

By tuyenhm68·Created 8 months ago·Updated 28 days ago· 1
Update Custom Nodes
    • status
    • message
    confirm_updatefalse
    auto_restarttrue
    node_filter
    restart_delay3

    If your custom_nodes/ folder is anything like the average ComfyUI install, it's a graveyard of forty git clones, a third of them months behind. Manager can update them all, but that's a click through the UI. HMT_UpdateCustomNodes is the same sweep as a node: it walks every folder in custom_nodes/, pulls the latest from any repo that has a .git, runs install.py where one exists, reinstalls requirements, and gives you a summary - optionally restarting ComfyUI when it's done.

    It's from the HMT Suite pack by tuyenhm68, and it's a sibling to the pack's Update ComfyUI node. Same underlying updater, same pygit2 approach, same install.

    How it works

    The node scans ComfyUI/custom_nodes/, skipping hidden and underscore-prefixed folders. For each directory it checks for a .git folder:

    • Has .git → stash local edits, detect the default branch (master or main), pull, and if anything changed run install.py and requirements.txt.
    • No .git → skipped with a warning. This is the honest limitation: any node you installed from a zip or by copying files can't be updated this way, because there's no remote to pull from.

    The scan includes everything with a .git - including, amusingly, this pack itself if you installed it by clone. It updates itself along with the rest, which is either satisfying or mildly alarming depending on how you feel about auto-updaters.

    Inputs

    • confirm_update - default false; the update only runs when you flip it to true. Standard HMT safety latch.
    • auto_restart - restart the server after the sweep if anything updated.
    • node_filter (optional) - a folder name. Fill it in to update just one node instead of everything.
    • restart_delay (optional) - seconds before the bounce, default 3.

    Outputs

    Two: status and message, where the message is a summary like "Update complete: 3 updated, 12 skipped, 1 failed (out of 16 nodes)". Useful as a sanity check, less useful if you wanted per-node detail - the detailed results go to the console.

    Install and the pygit2 gotcha

    cd ComfyUI/custom_nodes
    git clone https://github.com/tuyenhm68/ComfyUI-HMT-Suite.git
    cd ComfyUI-HMT-Suite
    pip install -r requirements.txt
    

    Then the usual warning that applies to both HMT updaters: requirements.txt only installs requests, and this node needs pygit2, which is not in it. Install it yourself, into the same Python that runs ComfyUI:

    pip install pygit2
    

    On Windows portable that means python_embeded\python.exe -m pip install pygit2, not your system Python. Skip this and the node errors out with "pygit2 is not installed."

    Where to be careful

    Updating everything at once is how environments break. The KB's own framing is blunt about this: node packs share one Python environment with no isolation, and a package update that works for node A can silently break node B. That's why Manager pushes snapshots before a big update. This node has no snapshot step - so before you sweep all forty repos, consider whether you're okay rolling back by hand, or use node_filter to update just the stale ones you care about.

    Used selectively, it's great. Used blindly on a heavily-modified setup, it's a way to discover dependencies you forgot you had.

    CategoryHMT Suite/Utils

    Inputs (4)

    NameTypeDefaultDescription
    confirm_updateBOOLEANfalse
    auto_restartBOOLEANtrue
    node_filteroptSTRING
    restart_delayoptINT30–10

    Outputs (2)

    NameTypeDescription
    statusSTRING
    messageSTRING