8058e17456 fix(snapshot): paired drift-corruption fix — duplicate-install guard + boot-time mismatch (#161, #162) (#186)
* fix(snapshot): prevent drift corruption from duplicate installs + boot-time mismatch (#161, #162)

Closes #162 and #161 as the paired fix the issues describe — both touch
the same data-loss surface and verify against the same dev-sync rig.

installs at import time, log critical, register nothing in the
alphabetical loser; client-side `window` sentinel as belt-and-suspenders;
align .env.example / dev-iteration-loop / sync_to_dev / README at the
Registry-derived `koolook/` path.

compare against live /userdata + picks, set a drift flag on mismatch;
gate periodic + pre-load autosave routing to `_unsaved_autosave/` while
drifted; promote status pill to "drifted" precedence over "saved" with a
recovery tooltip; auto-clear on the next markStateSaved (Save / Load).

26 new tests (14 install guard, 4 sidebar sentinel, 8 boot drift) —
316 total passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(snapshot): apply review fixes — canonical fingerprint + early loser exit + drift timestamp

Review-driven follow-ups on PR #186:

1. **Symmetrize file-side fingerprint (MEDIUM).** `detectBootDrift`
   now uses a new `_canonicalStateFingerprint()` that normalizes the
   workflows tree through `normalizeWorkflowsStore` AND deep-sorts keys
   via `sortJsonValue`. Without this, hand-edited / cross-machine /
   pre-v0.3 files would false-positive as drifted on first boot
   (e.g. `archived: "false"` string vs `false` bool, missing
   `directories: {}`, key insertion-order asymmetry from the
   `{...wf, archived, module, tags}` spread). `_computeFingerprint`
   stays unchanged so the localStorage save baseline contract holds
   for existing users. New regression test verifies a shape-only diff
   does NOT trigger drift.

2. **Gate fork imports on `_is_winning_install` (LOW).** Non-winning
   duplicate installs now short-circuit before the heavy torch / PIL /
   diffusers / aiohttp imports, exiting in ~5 LoC instead of paying
   full import cost just to discard the mappings.

3. **Drift timestamp uses `driftDetectedAt`, not stale
   `lastNamedSaveAt` (LOW).** The localStorage save baseline could be
   from a prior session whose live state was already corrupt —
   surfacing it as "Last named save" in the drift tooltip would
   mislead. Replaced with the session-noticed-at timestamp from
   `_bootDriftDiagnostics`.

352 tests passing (316 prior + 26 from PR #186 + 1 new normalize-
symmetry case).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(install-guard): fail safe on unreadable / non-UTF-8 siblings (#162)

Re-review follow-up. The import-time duplicate-install scan could crash
the entire plugin load (fail-silent — the alphabetical winner vanished
too, not just the loser) on two unguarded paths:

- detect_duplicate_koolook_installs: the per-entry is_dir()/is_file()
  over custom_nodes/ siblings was unguarded, so a non-traversable
  sibling (restrictive perms, broken mount, a special dir) raised
  PermissionError up into __init__.py. No duplicate even required.
  Now caught per-entry and skipped.
- read_pyproject_version: read_text(encoding="utf-8") raises
  UnicodeDecodeError (a ValueError, NOT OSError) on a non-UTF-8 /
  binary pyproject.toml, escaping the `except OSError`. Now degrades
  to "?" via `except (OSError, ValueError)`.
- __init__.py: wrapped the guard call site as a final backstop — any
  unforeseen guard failure now degrades to register-normally rather
  than aborting the import.

Both paths reproduced before the fix; the first surfaced while running
the suite from a /tmp checkout whose parent held a root-owned dir.

3 regression tests added (non-traversable sibling skipped; non-UTF-8
pyproject -> "?"; report survives a non-UTF-8 sibling). Full suite:
452 passed (449 + 3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: kflame99 <261674183+kflame99@users.noreply.github.com>
2026-06-02 18:44:57 +02:00
2026-05-16 01:25:39 +02:00
2025-09-28 14:48:07 +02:00
2026-05-23 10:23:04 +02:00

ComfyUI-Koolook

Kforge Labs for ComfyUI: a project-kit sidebar plus Koolook nodes for VFX, image, and video workflows.

Start here: KForge Labs ComfyUI-Koolook overview

That overview explains the sidebar, snapshots, saved workflows, modules, recovery tools, and included nodes for new users.

The main experience is the Kforge Labs sidebar. It helps you keep a project setup together: favorite nodes, saved workflows, reusable modules, tags, snapshots, and recovery tools.

Kforge Labs Sidebar

Use the sidebar as a reusable project kit.

Feature What it does
Snapshots Save and load the whole Kforge Labs state: favorite nodes, workflows, modules, tags, archive, and recovery data.
Search Find nodes, workflows, directories, and tags from one field. Tags keep exact capitalization, so Depth and depth can be separate folders.
Nodes Keep favorite nodes close, grouped by theme or repository name.
Workflows Save the whole script, save a selection of nodes, load workflows, or insert saved modules into the current canvas.
Recovery Use autosaves, starter presets, snapshot library settings, and missing-pack install helpers.

New here? Start with the KForge overview. Using it inside ComfyUI? Open the operational guide:

Included Nodes

Node ID Display name Category
EasyWan22Prompt Wan 2.2 Easy Prompt (Koolook) Koolook/Wan_Video
EasyResize_Koolook Easy Resize (Koolook) Koolook/Image
EasyAIPipeline Easy AI Pipeline (Koolook) Koolook/Pipeline
easy_ImageBatch Easy Image Batch (Koolook) Koolook/Image
KoolookLoadCameraPosesAbsolute Koolook Load Camera Poses (Absolute Path) Koolook/Camera
Easy_hdr_VAE_encode Easy HDR VAE Encode (Koolook) Koolook/VAE
Easy_hdr_VAE_decode Easy HDR VAE Decode (Koolook) Koolook/VAE
Easy_Pattern Easy Pattern (Koolook) Koolook/Testing
Easy_LoadVideo Easy Load Video (Koolook) Koolook/Video
Easy_VideoCombine Easy Video Combine (Koolook) Koolook/Video

The root Koolook nodes and the slim Radiance Koolook VAE wrappers have no extra Python dependencies beyond torch, which ComfyUI already requires.

Install

ComfyUI-Manager

  1. Open ComfyUI Manager.
  2. Choose Install Custom Nodes.
  3. Install by Git URL: https://github.com/malkuthro/ComfyUI-Koolook.git
  4. Restart ComfyUI.
  5. Open the Kforge Labs sidebar tab.

Manual

Clone this repository into ComfyUI/custom_nodes/:

git clone https://github.com/malkuthro/ComfyUI-Koolook.git

Restart ComfyUI after installation.

One install at a time. If you already installed Kforge Labs via ComfyUI Manager, it lives at custom_nodes/koolook/ (the Manager / Registry-derived folder name). A second custom_nodes/ComfyUI-Koolook/ created by git clone is a parallel install — ComfyUI loads BOTH on every boot, both register the same routes and sidebar tab, and the workflow store silently corrupts on every restart. From v0.3.8 the plugin detects this and prints a critical log naming both paths, disabling the non-winning copy — but the cleanest fix is to remove one folder. Pick the install method you want and stick with it.

Learn More

Troubleshooting

What you see What it usually means What to do
The Kforge Labs tab does not appear ComfyUI needs a restart, or the extension did not load Restart ComfyUI and check the terminal for [Koolook] messages.
The Help guide does not open The browser blocked the popup Allow popups for the ComfyUI page, or open web/guide/index.html directly.
Missing custom nodes after loading a workflow One or more node packs used by that workflow are not installed In Kforge Labs, use Tools → Install missing packs, or use ComfyUI Manager's Install Missing Custom Nodes flow.
Snapshot save/load fails The snapshot library path may be missing, read-only, or unavailable Use Snapshot → Save to... or Load from... and choose a writable folder.
A loaded snapshot looks older than expected Named saves and auto-saves are intentionally separate In Snapshot → Load, select the snapshot and check Recovery auto-saves for a newer periodic/pre-load recovery.

Support

For reproducible bugs, open a GitHub issue. For the fastest answer, include your ComfyUI version, Koolook version, operating system, install method, terminal log, browser console errors, and steps to reproduce. See SUPPORT.md for the exact checklist.

Stability

For production work, install a pinned release tag or commit instead of following a moving branch head. Node IDs are treated carefully so saved ComfyUI workflows continue to load across compatible updates.

License

GPL-3.0. See LICENSE.

This package incorporates and adapts GPL-3.0 code from fxtdstudios/radiance under forks/radiance_koolook/. Attribution and per-fork modification notes are tracked in forks/THIRD_PARTY.md and forks/forks_manifest.yaml.

S
Description
No description provided
Readme GPL-3.0
220 MiB
Languages
Python 67.9%
JavaScript 30.3%
HTML 1%
CSS 0.5%
Shell 0.2%
Other 0.1%