From 0b1a30bee0bc320a05a1a5669f9aa3b6db5ac17e Mon Sep 17 00:00:00 2001 From: Nakano Kenji Date: Mon, 2 Feb 2026 17:30:33 +0800 Subject: [PATCH] fix: XY Plot columns/labels accept upstream connection - Make columns/x_labels/y_labels forceInput so they can receive connection from XY Matrix - Fix workflow JSON links for SaveImage (now correctly saves the XY Plot big image) --- assets/ArtistBlendXYPlot_Test.json | 9 +++++---- assets/ArtistXYPlot_Test.json | 9 +++++---- nodes/image_xy_plot.py | 9 ++++++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/assets/ArtistBlendXYPlot_Test.json b/assets/ArtistBlendXYPlot_Test.json index 1193f6c..ca7e133 100644 --- a/assets/ArtistBlendXYPlot_Test.json +++ b/assets/ArtistBlendXYPlot_Test.json @@ -2,7 +2,7 @@ "id": "simplechat-artist-blend-xyplot-test", "revision": 0, "last_node_id": 13, - "last_link_id": 19, + "last_link_id": 20, "nodes": [ { "id": 1, @@ -218,7 +218,7 @@ { "name": "y_labels", "type": "STRING", "link": 17 } ], "outputs": [ - { "name": "image", "type": "IMAGE", "links": [19] } + { "name": "image", "type": "IMAGE", "links": [19, 20] } ], "properties": { "aux_id": "Moeblack/ComfyUI-SimpleChat", "Node name for S&R": "SimpleChatXYPlot" }, "widgets_values": [8, 8, "black", "white", "Artist Blend (X + Y)"] @@ -247,7 +247,7 @@ "order": 12, "mode": 0, "inputs": [ - { "name": "images", "type": "IMAGE", "link": 19 } + { "name": "images", "type": "IMAGE", "link": 20 } ], "outputs": [], "properties": { "Node name for S&R": "SaveImage" }, @@ -272,7 +272,8 @@ [16, 3, 2, 10, 2, "STRING"], [17, 3, 3, 10, 3, "STRING"], [18, 9, 0, 10, 0, "IMAGE"], - [19, 10, 0, 11, 0, "IMAGE"] + [19, 10, 0, 11, 0, "IMAGE"], + [20, 10, 0, 12, 0, "IMAGE"] ], "groups": [], "config": {}, diff --git a/assets/ArtistXYPlot_Test.json b/assets/ArtistXYPlot_Test.json index 331e0cc..9a4bba8 100644 --- a/assets/ArtistXYPlot_Test.json +++ b/assets/ArtistXYPlot_Test.json @@ -2,7 +2,7 @@ "id": "simplechat-artist-xyplot-test", "revision": 0, "last_node_id": 13, - "last_link_id": 19, + "last_link_id": 20, "nodes": [ { "id": 1, @@ -213,7 +213,7 @@ { "name": "y_labels", "type": "STRING", "link": 17 } ], "outputs": [ - { "name": "image", "type": "IMAGE", "links": [19] } + { "name": "image", "type": "IMAGE", "links": [19, 20] } ], "properties": { "aux_id": "Moeblack/ComfyUI-SimpleChat", "Node name for S&R": "SimpleChatXYPlot" }, "widgets_values": [8, 8, "black", "white", "Artist x Environment"] @@ -242,7 +242,7 @@ "order": 12, "mode": 0, "inputs": [ - { "name": "images", "type": "IMAGE", "link": 19 } + { "name": "images", "type": "IMAGE", "link": 20 } ], "outputs": [], "properties": { "Node name for S&R": "SaveImage" }, @@ -267,7 +267,8 @@ [16, 3, 2, 10, 2, "STRING"], [17, 3, 3, 10, 3, "STRING"], [18, 9, 0, 10, 0, "IMAGE"], - [19, 10, 0, 11, 0, "IMAGE"] + [19, 10, 0, 11, 0, "IMAGE"], + [20, 10, 0, 12, 0, "IMAGE"] ], "groups": [], "config": {}, diff --git a/nodes/image_xy_plot.py b/nodes/image_xy_plot.py index cdda375..f749aea 100644 --- a/nodes/image_xy_plot.py +++ b/nodes/image_xy_plot.py @@ -48,9 +48,12 @@ class SimpleChatXYPlot: return { "required": { "images": ("IMAGE",), - "columns": ("INT", {"default": 4, "min": 1, "max": 64}), - "x_labels": ("STRING", {"multiline": True, "default": ""}), - "y_labels": ("STRING", {"multiline": True, "default": ""}), + }, + "optional": { + # These support both widget input and upstream connection (forceInput) + "columns": ("INT", {"default": 4, "min": 1, "max": 64, "forceInput": True}), + "x_labels": ("STRING", {"multiline": True, "default": "", "forceInput": True}), + "y_labels": ("STRING", {"multiline": True, "default": "", "forceInput": True}), "padding": ("INT", {"default": 8, "min": 0, "max": 256}), "label_padding": ("INT", {"default": 8, "min": 0, "max": 256}), "bg_color": (["black", "white"], {"default": "black"}),