Nodes/Shima/Shima Canary (Ghost Detector)
ComfyUI Node

Shima Canary (Ghost Detector)

Why is my VRAM full? This node rats out the other ComfyUI

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Canary (Ghost Detector)
  • any_input
  • status
  • ghost_detected

You know the feeling: generation crawls, the GPU is inexplicably pegged, and you can't figure out why. Shima Canary exists for the sneakiest version of that problem - a second ComfyUI process you forgot to close, still parked in VRAM. The name is the coal-mine joke, and it fits: this node doesn't fix anything, it just detects the ghost and tells you it's there.

How it works

Canary is a process scanner, not an image node. It uses psutil to enumerate every running process, then looks for other Python processes whose command line contains main.py - which is how ComfyUI starts. It filters out its own process, its parent, and its children, so it only flags other ComfyUI instances that aren't part of the current run. Any survivors get reported as ghosts.

The output is a status string and a boolean:

  • Clean run: ✅ System Healthy: No ghosts detected, with ghost_detected false.
  • Ghost found: ⚠️ Attention: Ghost ComfyUI detected (PIDs: ...), with ghost_detected true.

It's an output node, so it always executes even with nothing downstream.

The input that isn't one

The only input is any_input, typed as the wildcard *. Here's the thing: it's a trigger, not data. The node doesn't read or transform whatever you connect - it just needs a signal to fire. You can hang it off a load image, a sampler output, a string - anything. You could even leave it unwired and the node still runs, because being an output node means it executes on its own. Don't overthink the input; it exists so the node sits naturally in a graph.

When you'd use it

Realistically? This is a diagnostic you drop in when something's wrong, or keep at the edge of a workflow as a canary-in-the-coal-mine that runs every queue. The honest take: the same info is available in your task manager. What Canary adds is convenience - it runs inside the workflow, right where you're looking, and tells you in plain words instead of making you hunt through process lists.

Where it genuinely shines: multi-instance setups. If you run two ComfyUI servers (say, a stable one and a test one), ghost processes are a recurring hazard, and this catches them before you burn an hour blaming your workflow.

Installing it

Part of the Shima pack - ComfyUI Manager → search Shima, or:

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf.git Shima

Restart ComfyUI. The pack auto-installs psutil on first load - which Canary needs - along with its other deps and companion repos (ComfyUI-Impact-Pack, cg-use-everywhere).

Common issues

  • "Check failed: ..." - usually psutil can't read another process's command line due to OS permissions. On Linux/macOS this is uncommon; on Windows, process-name detection is more fragile, so take a "healthy" reading there with a grain of salt.
  • It flags nothing but VRAM is still full. Canary only detects other main.py Python processes. A stuck training job, a runaway notebook, or a zombie process that doesn't match the pattern won't be caught. It's a targeted detector, not a system monitor.
  • "Why is there a wire on a detector?" - that's the any_input trigger. Wire or don't; the detection runs regardless.

If you've never had a ghost-process problem, this node is a curiosity. If you have, you'll recognize immediately why it exists - and you'll be glad the pack put a name on the problem.

CategoryShima/System

Inputs (1)

NameTypeDefaultDescription
any_input*

Outputs (2)

NameTypeDescription
statusSTRING
ghost_detectedBOOLEAN