WebcamCapture ignores capture_on_queue flag in IS_CHANGED
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Locate the WebcamCapture node and its IS_CHANGED method, then compare the requested behavior with the float('NaN') pattern in tests/execution/testing_nodes/testing-pack/specific_tests.py. Verify that queueing with capture_on_queue enabled forces re-execution while the disabled case still uses the image hash.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 134k
- Forks
- 15.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 161
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comfy-Org/ComfyUI
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Potential Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Potential Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
All issues in Comfy-Org/ComfyUI
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100