Skip to content

Commit 05a260d

Browse files
authored
Add files via upload
v2.0.2
1 parent 60dcf42 commit 05a260d

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

DaC.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,35 +55,40 @@ def create_tile_coordinates(image_width, image_height, tile_width, tile_height,
5555
if col == grid_x - 1:
5656
x = image_width - tile_width
5757
tiles.append((x, y))
58-
matrix[row][col] = f"({x},{y})"
59-
58+
6059
if tile_order == 1: # Spiral order
6160
# Rearrange tiles in an outward clockwise spiral pattern starting from the center
6261
spiral_tiles = []
63-
center_x, center_y = num_columns // 2, num_rows // 2
64-
x, y = center_x, center_y
62+
visited = set()
63+
x, y = num_columns // 2, num_rows // 2
6564
dx, dy = 1, 0 # Start moving right
66-
layer, steps = 1, 0
65+
layer = 1
6766

6867
while len(spiral_tiles) < len(tiles):
6968
for _ in range(2):
7069
for _ in range(layer):
71-
if 0 <= x < num_columns and 0 <= y < num_rows:
70+
if 0 <= x < num_columns and 0 <= y < num_rows and (x, y) not in visited:
7271
index = y * num_columns + x
7372
if index < len(tiles):
7473
spiral_tiles.append(tiles[index])
75-
steps += 1
74+
visited.add((x, y))
7675
x += dx
7776
y += dy
7877
dx, dy = -dy, dx # Rotate direction clockwise
7978
layer += 1
8079

81-
# Reverse the tiles
8280
spiral_tiles.reverse()
8381
tiles = spiral_tiles
8482

83+
# Rebuild matrix to match tile order
84+
for i, (x, y) in enumerate(tiles):
85+
row, col = y // (tile_height - overlap_y), x // (tile_width - overlap_x)
86+
matrix[row][col] = f"{i + 1} ({x},{y})"
87+
8588
return tiles, matrix
8689

90+
91+
8792
class DaC_Algorithm:
8893
@classmethod
8994
def INPUT_TYPES(s):

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ Coming Soon!
116116
Install via ComfyUI-Manager or Clone this repo into `custom_modules`:
117117

118118
# Changelog
119+
`Version 2.0.2` (2025-05-06)<br>
120+
- Tile numbers have been added next to the coordinates in the matrix UI.
121+
119122
`Version 2.0.0` (2025-05-04)<br>
120123
- Improved user experience.
121124
- Scaling using model is now optional.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[project]
33
name = "comfyui_steudio" # Unique identifier for your node. Immutable after creation.
44
description = "Divide and Conquer Node Suite: It calculates the optimal upscale resolution and seamlessly divides the image into tiles, ready for individual processing using your preferred workflow. After processing, the tiles are seamlessly merged into a larger image, offering sharper and more detailed visuals."
5-
version = "2.0.1"
5+
version = "2.0.2"
66
license = { file = "LICENSE.txt" }
77
dependencies = [] # Filled in from requirements.txt
88

@@ -12,4 +12,4 @@ Repository = "https://github.com/Steudio/ComfyUI_Steudio"
1212
[tool.comfy]
1313
PublisherId = "steudio"
1414
DisplayName = "ComfyUI_Steudio"
15-
Icon = "https://raw.githubusercontent.com/Steudio/ComfyUI_Steudio/main/Images/Steudio_Logo_Circle.png" # SVG, PNG, JPG or GIF (MAX. 800x400px)
15+
Icon = "https://raw.githubusercontent.com/Steudio/ComfyUI_Steudio/main/Images/Steudio_Logo_Circle.png" # SVG, PNG, JPG or GIF (MAX. 800x400px)

0 commit comments

Comments
 (0)