Skip to content

WebcamCapture ignores capture_on_queue flag in IS_CHANGED #13337

@mango766

Description

@mango766

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions