π Colab Keep Alive
Stop Google from killing your session mid-render
- any_input
- status
- passthrough
Anyone who's run ComfyUI on Google Colab has hit this: Colab disconnects idle sessions, and that's a real risk for a long batch render or anything with pauses in it (a slow model download, an extended sampling run). This node tries to simulate activity so Colab doesn't decide the session is idle and pull the plug out from under you mid-run.
Why this exists specifically for Colab
This whole pack reads as a personal Colab toolkit - the README's install instructions are written entirely around /content/ComfyUI/custom_nodes, and this node is the clearest evidence of that context. It's solving a problem that's specific to free/hosted notebook environments with idle-disconnect policies, not a general ComfyUI limitation.
How it works
method picks the approach: aggressive, gpu_ping, colab_heartbeat, memory_touch, or file_touch - each presumably a different way of generating activity Colab's idle detection might notice (a small GPU operation, a filesystem write, touching memory, or whatever its own heartbeat mechanism responds to). Rather than firing on a perfectly fixed schedule, interval_min/interval_max give it a randomized range to work within, which is the more sensible choice - regular, mechanical pinging is a worse imitation of real usage than jittered timing.
Inputs and outputs
enabled(BOOLEAN, defaulttrue).interval_min/interval_max(INT, defaults 30/60) - the randomized firing range.method(enum, defaultaggressive).any_input(optional, wildcard) - wire your graph through it so it actually gets invoked as part of a run.- Outputs:
status(STRING) andpassthrough(wildcard - whatever came in onany_input, unchanged).
Installing it
No models or extra dependencies mentioned in the README:
cd ComfyUI/custom_nodes
git clone https://github.com/huyl3-cpu/comfyui-sortlist.git
Restart ComfyUI afterward. Search ComfyUI Manager first if you'd rather not clone manually, but a small personal pack like this may not be indexed there.
Common issues and troubleshooting
It only helps during an active run. This node fires as part of graph execution - it doesn't run in the background between queued jobs. If your real problem is a Colab session sitting idle with nothing queued, this doesn't substitute for keeping the tab active or a separate always-on keep-alive script; it only protects you while something is actually executing.
It's a Colab-specific workaround, full stop. On a local machine, a rented GPU box, or a hosted service like comfy.icu, there's no idle-disconnect behavior for this node to fight - it has nothing to do there and isn't solving a problem you have.
No method is a guarantee. Google has changed Colab's idle-detection behavior before without warning, so treat any of the five methods here as "worth trying for a long unattended render," not a promise your session survives to the end. If a render is genuinely critical, don't rely on this alone - keep an eye on the session yourself too.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | β |
| interval_min | INT | 3015β60 | β |
| interval_max | INT | 6030β120 | β |
| method | COMBO | aggressive | 5 options: aggressive, gpu_ping, colab_heartbeat, memory_touch, file_touch |
| any_inputopt | * | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| status | STRING | β |
| passthrough | * | β |