Simplify mask preview defaults

Removes the obsolete pass_through input from ImageAndMaskPreviewMXD and resets the default mask_color to black. This aligns the node behavior with its current always-return-composite implementation and updates the schema baseline snapshot.
This commit is contained in:
Maxed-Out-99
2026-09-29 19:18:02 -07:00
parent 58066adbde
commit a5db511a70
2 changed files with 4 additions and 12 deletions
+3 -4
View File
@@ -509,8 +509,7 @@ class ImageAndMaskPreviewMXD(SaveImage):
return {
"required": {
"mask_opacity": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
"mask_color": ("STRING", {"default": "255, 255, 255", "tooltip": "RGB/RGBA CSV, hex, or color name."}),
"pass_through": ("BOOLEAN", {"default": True, "tooltip": "Legacy option. This node now always returns the composite without creating a preview."}),
"mask_color": ("STRING", {"default": "0, 0, 0", "tooltip": "RGB/RGBA CSV, hex, or color name."}),
},
"optional": {
"image": ("IMAGE",),
@@ -519,7 +518,7 @@ class ImageAndMaskPreviewMXD(SaveImage):
"hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
}
def _build_composite(self, image=None, mask=None, mask_opacity=1.0, mask_color="255, 255, 255"):
def _build_composite(self, image=None, mask=None, mask_opacity=1.0, mask_color="0, 0, 0"):
image = _mxd_image_batch(image)
if image is None and mask is None:
@@ -549,7 +548,7 @@ class ImageAndMaskPreviewMXD(SaveImage):
alpha = alpha.unsqueeze(-1)
return (image * (1.0 - alpha) + rgb * alpha).clamp(0.0, 1.0)
def execute(self, mask_opacity, mask_color, pass_through, filename_prefix="ComfyUI", image=None, mask=None, prompt=None, extra_pnginfo=None):
def execute(self, mask_opacity, mask_color, filename_prefix="ComfyUI", image=None, mask=None, prompt=None, extra_pnginfo=None):
composite = self._build_composite(image=image, mask=mask, mask_opacity=mask_opacity, mask_color=mask_color)
return (composite,)
+1 -8
View File
@@ -796,7 +796,7 @@
"required": {
"mask_color": {
"config": {
"default": "255, 255, 255",
"default": "0, 0, 0",
"tooltip": "RGB/RGBA CSV, hex, or color name."
},
"type": "STRING"
@@ -809,13 +809,6 @@
"step": 0.01
},
"type": "FLOAT"
},
"pass_through": {
"config": {
"default": true,
"tooltip": "Legacy option. This node now always returns the composite without creating a preview."
},
"type": "BOOLEAN"
}
}
},