WebcamCapture ignores capture_on_queue flag in IS_CHANGED

Open Beginner friendly
#13,337 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
ai

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/ComfyUI

All issues in Comfy-Org/ComfyUI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.