Bug
The WebcamCapture node has a capture_on_queue option (default: True) that's supposed to trigger a new capture every time a prompt is queued. But the IS_CHANGED method completely ignores this flag:
@classmethod
def IS_CHANGED(cls, image, width, height, capture_on_queue):
return super().IS_CHANGED(image) # capture_on_queue is never used!
super().IS_CHANGED(image) returns a SHA-256 hash of the image file. When capture_on_queue=True, if the webcam frame written to disk happens to match the previous one (or the file hasn't been updated yet), ComfyUI's caching layer sees the same hash and skips re-execution entirely. The node appears to "freeze" and doesn't process new frames.
Expected behavior
When capture_on_queue=True, IS_CHANGED should return float('NaN') so the node is always considered changed and re-executed on every queue. When capture_on_queue=False, the file hash check is correct — only re-run if the image actually changed.
Fix
@classmethod
def IS_CHANGED(cls, image, width, height, capture_on_queue):
if capture_on_queue:
return float("NaN")
return super().IS_CHANGED(image)
This matches the pattern used elsewhere in the codebase (e.g. tests/execution/testing_nodes/testing-pack/specific_tests.py) where float('NaN') is returned to force unconditional re-execution.
Bug
The
WebcamCapturenode has acapture_on_queueoption (default:True) that's supposed to trigger a new capture every time a prompt is queued. But theIS_CHANGEDmethod completely ignores this flag:super().IS_CHANGED(image)returns a SHA-256 hash of the image file. Whencapture_on_queue=True, if the webcam frame written to disk happens to match the previous one (or the file hasn't been updated yet), ComfyUI's caching layer sees the same hash and skips re-execution entirely. The node appears to "freeze" and doesn't process new frames.Expected behavior
When
capture_on_queue=True,IS_CHANGEDshould returnfloat('NaN')so the node is always considered changed and re-executed on every queue. Whencapture_on_queue=False, the file hash check is correct — only re-run if the image actually changed.Fix
This matches the pattern used elsewhere in the codebase (e.g.
tests/execution/testing_nodes/testing-pack/specific_tests.py) wherefloat('NaN')is returned to force unconditional re-execution.