Nodes/ComfyUI-SmartQueue/Smart Cooldown & Pause
ComfyUI Node

Smart Cooldown & Pause

Smart Cooldown & Pause

By CraftopiaStudio·Created 3 days ago·Updated about 16 hours ago· 0
Smart Cooldown & Pause
  • passthrough
  • passthrough_2
  • passthrough
  • passthrough_2
  • status
fixed_delay_seconds30
wait_for_temptrue
target_temp_c65
poll_interval_seconds5
max_wait_seconds300
notify_toastfalse
notify_soundfalse
notify_sound_choiceDefault
custom_sound_path
unload_models_before_waitfalse
clear_cache_before_waitfalse
wait_for_clickfalse

Queue fifty renders onto a hot card and ComfyUI will happily run them all back-to-back, GPU pegged at 100% until it's done - or until thermal limits force a crash. There's no native "wait N seconds between jobs," and ComfyUI even removed its old pause button. If you've ever queued a big batch and crossed your fingers about your 4090's temps, you know the exact problem this node exists for. Smart Cooldown & Pause is an in-graph gate: drop it into the execution path and it can sleep a fixed delay, wait until the GPU physically cools below a temperature you set, or block until you click a ▶ Continue button on the node itself. It's part of the ComfyUI-SmartQueue pack (same author's GPU-aware queue autopilot + render queue panel), but the node works as a standalone gate even if you never touch the rest of the pack.

How it works

The node sits inline in your graph - wire an image (or literally anything, both input sockets are wildcard *) through it, and it becomes a checkpoint on that branch. When execution reaches it, it runs through its checks in order: unload models if asked, clear the VRAM cache if asked, sleep the fixed delay, then poll your GPU temperature until it drops under your target. Only then does execution flow onward to your Save node.

Two details show the author thought about failure. Temperature polling shells out to nvidia-smi - no Python deps, no NVML. If nvidia-smi isn't there (AMD/Intel/CPU-only machine), the temp wait quietly logs "GPU temp unavailable" and skips itself rather than erroring; the fixed delay and click gate still work. And it's declared an output node - plumbing jargon for "ComfyUI must always run this one." ComfyUI aggressively caches nodes whose inputs didn't change; this flag stops it from deciding your pause is unnecessary and skipping it. For a gate, that's the difference between working and being decoration.

The inputs that matter

The node has a LOT of switches, but the defaults are sane and you'll mostly touch three. (The OPTIONS and NOTIFICATIONS groups are collapsed by default so it doesn't look scary.)

  • fixed_delay_seconds (default 30) - the always-applied sleep before continuing. This alone is your "give the card a minute to shed heat between jobs" answer.
  • wait_for_temp + target_temp_c (default on, 65°C) - polls the GPU every poll_interval_seconds (default 5) until temp drops below the target, capped by max_wait_seconds (default 300) so a stuck reading can't hold your queue hostage forever.
  • wait_for_click - turns the node into a manual gate: it blocks after the cooldown until you hit ▶ Continue (or ✕ Cancel) on the node. Great for reviewing an output before it's saved, or gating a batch step-by-step.

Under OPTIONS, unload_models_before_wait drops model weights and clear_cache_before_wait actually reclaims that VRAM back to the driver (gc.collect() + torch's cache empty - the same thing as ComfyUI's "Free model and node cache" button). They're meant to be paired; unload alone just moves memory into the CUDA allocator's reserve, and the readme is refreshingly blunt that only the cache-clear moves the needle on nvidia-smi. notify_toast pops an on-screen message and notify_sound plays a tone (Default/Chime/Alert or a custom file) when the wait finishes - useful for an unattended batch. Outputs: your two passthrough lanes come back out unmodified, plus a status STRING telling you what the node actually did ("Fixed delay: 30s | Reached target: 63C") - wire it to a text-display node if you want receipts.

Installing it

ComfyUI Manager (search "ComfyUI-SmartQueue") or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/CraftopiaStudio/ComfyUI-SmartQueue.git

Restart ComfyUI. That's it - the pack declares zero Python dependencies, and the temperature feature needs nothing beyond nvidia-smi, which ships with any NVIDIA driver. No model downloads. The pack also ships two drag-and-drop workflow templates (cooldown-between-renders.json and manual-pause-wait-for-click.json) if you want a pre-wired starting point - swap the placeholder checkpoint for your own model.

Gotchas

The big one: the node blocks its entire branch while it waits. That's the point of a gate, but don't expect other work on that branch to keep flowing during the cooldown. And wait_for_click holds the execution thread for as long as you leave it - the node's ✕ Cancel button and ComfyUI's native interrupt both unstick it. On Linux, picking a custom sound file needs zenity (or kdialog); without either, it falls back to the built-in tones. With multiple GPUs it watches the first card in CUDA_VISIBLE_DEVICES - set that the same way you do for ComfyUI so you're both looking at the same GPU. One honest note: this pack is new and moving fast, so if a ComfyUI update changes behavior, check the pack's changelog before the forums.

Categoryutils

Inputs (14)

NameTypeDefaultDescription
fixed_delay_secondsFLOAT300–3600
wait_for_tempBOOLEANtrue
target_temp_cFLOAT6530–100
poll_interval_secondsFLOAT51–60
max_wait_secondsFLOAT3000–3600
notify_toastBOOLEANfalseShow a small on-screen popup message in ComfyUI when this node finishes waiting.
notify_soundBOOLEANfalse
notify_sound_choiceCOMBODefault4 options: Default, Chime, Alert, Custom...
custom_sound_pathSTRING
unload_models_before_waitBOOLEANfalseUnload all models from VRAM before waiting. Doesn't free the memory by itself — pair with clear_cache for that.
clear_cache_before_waitBOOLEANfalseActually reclaim VRAM back to the OS/driver before waiting (gc.collect() + torch's CUDA cache empty) — this is the step that makes nvidia-smi/Task Manager usage drop.
wait_for_clickBOOLEANfalse
passthroughopt*
passthrough_2opt*

Outputs (3)

NameTypeDescription
passthrough*
passthrough_2*
statusSTRING