From 50572452641fc5872365ce543ad10a3f05375076 Mon Sep 17 00:00:00 2001 From: gambletan Date: Wed, 11 Mar 2026 10:19:51 +0800 Subject: [PATCH] fix(SplitImageToTileList): use tile_height for vertical stride minimum In `get_grid_coords`, `stride_y` incorrectly uses `tile_width * 0.25` as its minimum instead of `tile_height * 0.25`. This is a copy-paste error from the `stride_x` line above. When tile_width and tile_height differ (non-square tiles), this produces an incorrect vertical stride. For example, with tile_width=512, tile_height=256, overlap=128, the minimum stride_y would be clamped to 128 (512*0.25) instead of the correct 64 (256*0.25), potentially producing gaps or incorrect tile placement in the vertical direction. This also affects `ImageMergeTileList` which calls the same function to reconstruct coordinates for merging. --- comfy_extras/nodes_images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy_extras/nodes_images.py b/comfy_extras/nodes_images.py index 4c57bb5cb..f43dcd01d 100644 --- a/comfy_extras/nodes_images.py +++ b/comfy_extras/nodes_images.py @@ -707,7 +707,7 @@ class SplitImageToTileList(IO.ComfyNode): def get_grid_coords(width, height, tile_width, tile_height, overlap): coords = [] stride_x = round(max(tile_width * 0.25, tile_width - overlap)) - stride_y = round(max(tile_width * 0.25, tile_height - overlap)) + stride_y = round(max(tile_height * 0.25, tile_height - overlap)) y = 0 while y < height: