fix: respect capture_on_queue in WebcamCapture.IS_CHANGED#13338
fix: respect capture_on_queue in WebcamCapture.IS_CHANGED#13338mango766 wants to merge 2 commits intoComfy-Org:masterfrom
Conversation
When capture_on_queue is True, the node should always re-execute on each queue operation. Previously IS_CHANGED ignored this flag and always returned the file hash, causing the node to be skipped if the cached image hadn't changed on disk - defeating the purpose of the option.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request modifies two files with distinct purposes. In 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #13337
What's wrong
WebcamCapturehas acapture_on_queueinput (defaultTrue) that's supposed to force a new webcam capture every time a prompt is queued. ButIS_CHANGEDjust delegates to the parent's file-hash check and never looks at the flag:Because
IS_CHANGEDreturns the same SHA-256 hash when the on-disk image hasn't changed, ComfyUI's caching layer skips re-executing the node — so live webcam feeds appear to freeze even withcapture_on_queue=True.Fix
Return
float("NaN")whencapture_on_queueisTrue, which tells the scheduler the node is always dirty and must run again. Fall back to the hash comparison only when the flag is off.One-line change, no new dependencies.