From 80acb32d218c544abb2d84be7f8ccdf406a27ced Mon Sep 17 00:00:00 2001 From: alexandremendoncaalvaro Date: Fri, 1 May 2026 00:20:33 -0300 Subject: [PATCH] feat(installers): pre-download CorridorKeyBlue alongside the green checkpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Today the bundled installers (Install_CorridorKey_Linux_Mac.sh and Install_CorridorKey_Windows.bat) fetch only the green checkpoint (`CorridorKey_v1.0.safetensors`). When a user later runs the keyer with `--screen-color blue` (or auto-detection picks blue), the Python runtime in `_ensure_torch_checkpoint` makes a one-time ~300 MB pull from HuggingFace before the first frame can render. That's a surprise mid-session download that's easy to miss in headless / batch contexts (Nuke, Houdini, render farms). Adds a parallel download block targeting `huggingface.co/nikopueringer/CorridorKeyBlue_1.0/resolve/main/CorridorKeyBlue_1.0.safetensors` right after the green block. Two design choices to call out: 1. The blue download is best-effort. If `curl --fail` returns non-zero (HF repo deleted, transient 5xx, no network) we log a one-line informational message and continue, deleting any partial file. The install still completes successfully so users keying green plates aren't blocked by an unrelated download. The Python runtime retries the download on first blue use, so the only cost of a failure here is a deferred 300 MB pull. 2. The check is "file exists?" not "checksum matches?" — same as the existing green block. Matches the established convention; keeps the scripts simple to audit. Verified locally with `bash -n` for the .sh script. The .bat script mirrors the same structure as the existing green block byte-for-byte including the `^(...^)` escapes and `errorlevel 1` checks. --- Install_CorridorKey_Linux_Mac.sh | 18 ++++++++++++++++++ Install_CorridorKey_Windows.bat | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/Install_CorridorKey_Linux_Mac.sh b/Install_CorridorKey_Linux_Mac.sh index ce1699d37..26ae09759 100755 --- a/Install_CorridorKey_Linux_Mac.sh +++ b/Install_CorridorKey_Linux_Mac.sh @@ -84,6 +84,24 @@ else fi fi +# CorridorKeyBlue (dedicated blue-screen weights). Optional: the green +# checkpoint above is the primary install. If the blue download fails — repo +# missing, network blip, etc. — we just skip it. The Python runtime +# (_ensure_torch_checkpoint) will retry the download on first --screen-color +# blue use, so a failure here only costs the user a one-time 300 MB pull at +# render time instead of bricking the install. +BLUE_SAFETENSORS_PATH="$CKPT_DIR/CorridorKeyBlue_1.0.safetensors" +HF_BLUE_BASE="https://huggingface.co/nikopueringer/CorridorKeyBlue_1.0/resolve/main" +if [ -f "$BLUE_SAFETENSORS_PATH" ]; then + echo "CorridorKeyBlue checkpoint already exists!" +else + echo "Downloading CorridorKeyBlue_1.0.safetensors (blue-screen model)..." + if ! curl -L --fail -o "$BLUE_SAFETENSORS_PATH" "$HF_BLUE_BASE/CorridorKeyBlue_1.0.safetensors"; then + echo "[INFO] Blue checkpoint not downloaded — it will fetch automatically the first time you run with --screen-color blue." + rm -f "$BLUE_SAFETENSORS_PATH" + fi +fi + echo "" echo "===================================================" echo " Setup Complete! You are ready to key!" diff --git a/Install_CorridorKey_Windows.bat b/Install_CorridorKey_Windows.bat index 7708d5053..cc584ad57 100644 --- a/Install_CorridorKey_Windows.bat +++ b/Install_CorridorKey_Windows.bat @@ -70,6 +70,23 @@ if exist "%SAFETENSORS_PATH%" ( ) ) +REM CorridorKeyBlue (dedicated blue-screen weights). Optional download: +REM if it fails (repo missing, network blip, etc.) the Python runtime will +REM retry on first --screen-color blue use, so failure here is non-fatal -- +REM users keying green plates aren't blocked by an unrelated download. +set "BLUE_SAFETENSORS_PATH=%CKPT_DIR%\CorridorKeyBlue_1.0.safetensors" +set "HF_BLUE_BASE=https://huggingface.co/nikopueringer/CorridorKeyBlue_1.0/resolve/main" +if exist "%BLUE_SAFETENSORS_PATH%" ( + echo CorridorKeyBlue checkpoint already exists! +) else ( + echo Downloading CorridorKeyBlue_1.0.safetensors ^(blue-screen model^)... + curl.exe -L --fail -o "%BLUE_SAFETENSORS_PATH%" "%HF_BLUE_BASE%/CorridorKeyBlue_1.0.safetensors" + if errorlevel 1 ( + echo [INFO] Blue checkpoint not downloaded -- it will fetch automatically the first time you run with --screen-color blue. + if exist "%BLUE_SAFETENSORS_PATH%" del "%BLUE_SAFETENSORS_PATH%" + ) +) + echo. echo =================================================== echo Setup Complete! You are ready to key!