From 323b34e20ddc3196f45fe4e7be93970fa77929a2 Mon Sep 17 00:00:00 2001 From: workordie <56337698+workordie@users.noreply.github.com> Date: Thu, 9 Jul 2026 08:36:21 +0200 Subject: [PATCH] GridStitchAdvanced: make mask_cells optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mask_cells was in the required inputs, so any API graph that omitted the key failed validation ("Required input is missing") — a default only pre-fills the UI, it isn't supplied for headless/API graphs. Move it to optional so graphs without mask_cells validate and fall back to the documented no-op (denoise all). No behaviour change for graphs that do set it. Verified via /object_info: mask_cells now under optional, mask output intact. Co-Authored-By: Claude Opus 4.8 --- nodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index f533367..6c4fc00 100644 --- a/nodes.py +++ b/nodes.py @@ -275,10 +275,13 @@ class GridStitchAdvanced: "tooltip": "Target TOTAL size of the stitched grid."}), "scale_method": (["lanczos", "bicubic", "area", "bilinear", "nearest-exact"], {"default": "lanczos"}), + }, + "optional": { + # optional (default "") so graphs that omit it still validate — matches the no-op contract. "mask_cells": ("STRING", {"default": "", "tooltip": "Cells to DENOISE for the MASK output (row-major, 1-indexed, e.g. '2,4-6'). Others are preserved. Empty = denoise all (mask is a no-op). Set via the picker's mask toggle, or by hand / from an app."}), + **{f"image_{i}": ("IMAGE",) for i in range(1, cls.MAX_IMAGES + 1)}, }, - "optional": {f"image_{i}": ("IMAGE",) for i in range(1, cls.MAX_IMAGES + 1)}, } RETURN_TYPES = ("IMAGE", "INT", "INT", "MASK")