From 089954f4535b57b1b18b83c8dde75b176351052c Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Mon, 2 Mar 2026 21:06:50 -0500 Subject: [PATCH] code improve --- comfy_extras/nodes_painter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy_extras/nodes_painter.py b/comfy_extras/nodes_painter.py index 01b9ef59d..b9ecdf5ea 100644 --- a/comfy_extras/nodes_painter.py +++ b/comfy_extras/nodes_painter.py @@ -71,8 +71,8 @@ class PainterNode(io.ComfyNode): @classmethod def execute(cls, mask, width, height, bg_color="#000000", image=None) -> io.NodeOutput: if image is not None: - h, w = image.shape[1], image.shape[2] - base_image = image + base_image = image[:1] + h, w = base_image.shape[1], base_image.shape[2] else: h, w = height, width r, g, b = hex_to_rgb(bg_color)