Nodes/MD Nodes/MD: Repo Fortress
ComfyUI Node

MD: Repo Fortress

Update or roll back your custom nodes from inside the graph — backups included

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Repo Fortress
    • status_report
    • changelog_preview
    • restart_required
    modeCheck Status Only
    branchmain
    dry_runfalse
    changelog_depth5
    restore_filelatest
    do_backuptrue
    backup_keep_count5
    trigger0
    debug_mode0 - Silent

    Every custom-node pack eventually breaks your workflow - an update lands, a dependency shifts, and suddenly the node that worked yesterday is erroring. MD_RepoMaintenance ("Repo Fortress") is a git operations center in node form: check a repo's status, list backups, pull updates, force-reset a broken install, or restore from a zip snapshot. It's the "I need to fix my nodes" node, and it's aimed squarely at the maintenance hell that's the most common complaint about the ComfyUI ecosystem.

    It's a sibling of the pack's Global Update Manager, but where that one sweeps all your custom_nodes, this one is per-repo and more surgical - with a focus on safe rollback. If you've ever run git pull on a pack, watched it break, and realized you had no way back, you'll understand why the backup-first design here is the selling point.

    How it works

    Pick a mode from the dropdown. Check Status Only runs git rev-parse and sync checks and prints the recent commit history (you control depth via changelog_depth) - a safe read that tells you where you are before you do anything. Then the options: list available backup zips, create a snapshot, standard update (git pull), update plus reinstall requirements, FORCE RESET & UPDATE (discards local changes and resets to origin - the unbreak button), or restore from a specific backup zip (default latest auto-picks the newest). Before anything modifies code, it zips the repo into a _backups folder unless you disable do_backup, and backup_keep_count rotates old ones.

    The inputs that matter

    • mode - the operation. The tooltip's "always check status first" is genuine advice.
    • dry_run - simulate without touching files. Keep it on when previewing destructive modes.
    • do_backup / backup_keep_count - the safety net and its retention. Backups are cheap insurance for a rollback path.
    • branch - main unless you're testing something.
    • restore_file - exact backup zip name, or latest.

    Outputs: status_report (STRING) summarizing the run, changelog_preview (STRING) with recent commits, and restart_required (BOOLEAN) - a signal you can wire into a text node or a conditional to remind yourself to restart ComfyUI after the update.

    Installing

    It is part of the pack, so install MD Nodes:

    cd path/to/ComfyUI/custom_nodes
    git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
    cd ComfyUI_MD_Nodes
    pip install -r requirements.txt
    

    Or ComfyUI Manager → MD Nodes → install → restart. It needs git on your PATH, nothing else; no models.

    Common issues

    The FORCE RESET mode is destructive by design - it discards all local changes, including any manual edits you've made to a pack's files. That's precisely the point when an update has truly broken a pack, but it's why dry_run and the auto-backup matter: check status first, back up, and only then reset. Also note the same execution-trigger quirk as the other MD maintenance nodes - if the node doesn't re-run when you change settings, connect a changing INT to the trigger input to force it. And keep your expectations honest: if the dependency environment is broken (a Python package conflict), pulling new code won't fix it - that's what the Global Update Manager's dependency analyzer is for.

    CategoryMD_Nodes/Utility

    Inputs (9)

    NameTypeDefaultDescription
    modeCOMBOCheck Status OnlyOPERATION MODE • Purpose: Select the maintenance action to perform. • Options: - Check Status: View git hash and sync state safely. - List Backups: Show available zip restore points. - Standard Update: Pull latest changes. - FORCE RESET: Discard local changes and reset to origin. ⭐ Recommended: Always Check Status before Updating.
    branchSTRINGmainGIT BRANCH • Purpose: Target branch for git updates/resets. ⭐ Recommended: 'main'. Do not change unless testing.
    dry_runBOOLEANfalseDRY RUN (SIMULATION) • Purpose: Simulate actions without modifying files. • Effect: Prints what WOULD happen to the console. ⭐ Recommended: True when previewing destructive actions.
    changelog_depthINT51–50CHANGELOG DEPTH • Purpose: Number of recent commit messages to display in the status report.
    restore_fileSTRINGlatestRESTORE FILENAME • Purpose: Exact backup zip filename to restore. • Note: 'latest' automatically picks the newest file in the backup dir.
    do_backupBOOLEANtrueAUTO-BACKUP • Purpose: Create a full zip snapshot before modifying code. ⭐ Recommended: True. Essential for atomic rollbacks.
    backup_keep_countINT51–50BACKUP RETENTION • Purpose: Number of recent backups to keep on disk. • Effect: Older backups are automatically rotated/deleted to save space.
    triggeroptINT00–9007199254740991EXECUTION TRIGGER • Purpose: Connect a Seed node to force execution on queue. • Note: Any change in value triggers the node.
    debug_modeoptCOMBO0 - SilentLOGGING VERBOSITY • Controls console output and enables System/IO profiling.

    Outputs (3)

    NameTypeDescription
    status_reportSTRING
    changelog_previewSTRING
    restart_requiredBOOLEAN