diff --git a/comfy_extras/nodes_webcam.py b/comfy_extras/nodes_webcam.py index 6349ac017..ab25be641 100644 --- a/comfy_extras/nodes_webcam.py +++ b/comfy_extras/nodes_webcam.py @@ -26,6 +26,8 @@ class WebcamCapture(nodes.LoadImage): @classmethod def IS_CHANGED(cls, image, width, height, capture_on_queue): + if capture_on_queue: + return float("NaN") return super().IS_CHANGED(image) diff --git a/server.py b/server.py index 881da8e66..ff74b3166 100644 --- a/server.py +++ b/server.py @@ -489,7 +489,8 @@ class PromptServer(): for key in original_pil.text: metadata.add_text(key, original_pil.text[key]) original_pil = original_pil.convert('RGBA') - mask_pil = Image.open(image.file).convert('RGBA') + with Image.open(image.file) as mask_pil_raw: + mask_pil = mask_pil_raw.convert('RGBA') # alpha copy new_alpha = mask_pil.getchannel('A')