From d5ede8964f8bedd45c55926f0ed8729ca4f98ef2 Mon Sep 17 00:00:00 2001 From: Z User Date: Fri, 16 Oct 2026 20:49:33 +0000 Subject: [PATCH] feat: ship one-click Windows updater (update.bat) --- CHANGELOG.md | 2 + update.bat | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 update.bat diff --git a/CHANGELOG.md b/CHANGELOG.md index 940d806..0fc1c8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### ⚡ Improvements +- **Updater**: The pack now ships a **`update.bat`** one-click updater for Windows. Place it in the pack folder (next to `__init__.py`) and double-click: it points the folder's git remote at the HuggingFace repository (fixing installs whose `origin` still points at a stale URL), fetches and force-syncs `main`, clears leftover files from older versions, and downloads the model weights through git-lfs — with a clear warning and install pointer when git-lfs is missing. It then self-verifies: it prints the current build id (`git log -1 --oneline`), counts the odd-latent fix marker in `nodes/project.py` (3 hits = fixed build), and flags any model file that is still a git-lfs placeholder. ComfyUI must still be restarted after updating. + - **Moxie MultiTrack Project Slow**: Removed the experimental node again, together with its `upscale_model` / `tiling` widgets and the even-latent first-pass snap — the shared project-node internals are restored byte-for-byte to their certified behavior. Workflows that referenced the Slow node need rewiring to **Moxie MultiTrack Project**. - **MultiTrack Project**: The inter-segment context overlap is now configurable. The new `context_frames` widget (5 / 22 / 39 / 56 frames, default 22) chooses how many frames of the previous segment are copied in as continuation context for segments using Context or Context Swap continuity — previously this was fixed at 22 frames in code. Longer values hand off motion more smoothly but generate that many extra frames per continued segment (each continuation also generates 12 grid-alignment tail frames that are trimmed after decode). Values are the H3 temporal-grid lengths already offered by the Moxie context sampler nodes; existing workflows keep 22 and behave exactly as before. The same widget (between `steps` and `seed`) is also exposed on **Moxie MultiTrack Project** — its baked euler/beta sampling stack is unchanged, so end users still only need `steps` and `seed` unless they touch the overlap. diff --git a/update.bat b/update.bat new file mode 100644 index 0000000..b377bb9 --- /dev/null +++ b/update.bat @@ -0,0 +1,138 @@ +@echo off +setlocal +title MMnode Updater + +REM ============================================================ +REM MMnode (Moxie-Multimedia) one-click updater +REM +REM Put this file INSIDE the pack folder: +REM ComfyUI\custom_nodes\\ +REM (next to __init__.py) and double-click it. +REM +REM It syncs code from HuggingFace, removes stale files from +REM old versions, downloads model weights via git-lfs, verifies +REM the build, and reminds you to restart ComfyUI. +REM ============================================================ + +cd /d "%~dp0" + +echo. +echo ================================================== +echo MMnode updater - syncing from HuggingFace +echo ================================================== +echo. + +if not exist "__init__.py" ( + echo [ERROR] This is not the MMnode pack folder. + echo Move update.bat into ComfyUI\custom_nodes\^ + echo next to __init__.py, then run it again. + goto end_fail +) + +where git >nul 2>&1 +if errorlevel 1 ( + echo [ERROR] Git is not installed or not in PATH. + echo Get it from https://git-scm.com/download/win + goto end_fail +) + +netstat -ano 2>nul | findstr /c:":8188" >nul 2>&1 +if not errorlevel 1 ( + echo [WARN] ComfyUI appears to be running on port 8188. + echo It must be fully closed for the update to take effect. + echo Continuing in 5 seconds - close it now... + timeout /t 5 /nobreak >nul +) + +if not exist ".git" ( + echo [*] No git repo here yet - initializing... + git init + if errorlevel 1 goto gitfail +) + +git remote remove origin >nul 2>&1 +git remote add origin https://huggingface.co/Moxiegen/Moxie-Multimedia +if errorlevel 1 goto gitfail + +echo. +echo [*] Fetching latest version from HuggingFace... +git fetch origin --prune +if errorlevel 1 ( + echo [ERROR] Could not reach HuggingFace - check your internet. + goto end_fail +) + +echo. +echo [*] Syncing files... +git reset --hard origin/main +if errorlevel 1 goto gitfail + +echo. +echo [*] Cleaning stale files from older versions... +git clean -fd -e update.bat >nul 2>&1 + +echo. +echo [*] Syncing model weights... +git lfs version >nul 2>&1 +if errorlevel 1 goto nolfs +git lfs install >nul 2>&1 +echo Downloading weights - first run can take several minutes... +git lfs fetch origin main +if errorlevel 1 echo [WARN] Weight download failed - check connection, re-run later. +git lfs checkout +goto after_lfs + +:nolfs +echo [WARN] git-lfs is NOT installed on this PC. +echo Code was updated, but model weights may be broken placeholders. +echo Install git-lfs from https://git-lfs.com +echo or run: winget install GitHub.git-lfs +echo ...then run this updater again. + +:after_lfs + +REM ---- verify build ---- +set FIXCOUNT=0 +for /f %%A in ('findstr /c:"_align_canvas_dimension" "nodes\project.py" ^| find /c /v ""') do set FIXCOUNT=%%A + +set POINTER=0 +for /r models %%F in (*.safetensors) do ( + if %%~zF LSS 1000 set /a POINTER+=1 +) + +echo. +echo ================================================== +for /f "delims=" %%L in ('git log -1 --oneline') do echo Build: %%L +echo Fix marker: %FIXCOUNT% found in nodes\project.py +if %FIXCOUNT% GEQ 3 ( + echo [OK] This is the fixed build. +) else ( + echo [ERROR] Fix marker missing - update did not complete! +) +if %POINTER% GTR 0 ( + echo [WARN] %POINTER% model file^(s^) are broken placeholders. + echo Install git-lfs from https://git-lfs.com and re-run. +) else ( + echo [OK] Model weights look good. +) +echo ================================================== + +echo. +echo All done. RESTART COMFYUI COMPLETELY before testing. +echo Close this window and any ComfyUI console, then start ComfyUI. +goto end_ok + +:gitfail +echo. +echo [ERROR] A git command failed - scroll up for the message. +goto end_fail + +:end_fail +echo. +pause +exit /b 1 + +:end_ok +echo. +pause +exit /b 0