Skip to content

Commit

Permalink
Update ImageNode.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowcz007 committed Mar 18, 2024
1 parent b6cfb30 commit 9dc4523
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nodes/ImageNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ def INPUT_TYPES(s):
# OUTPUT_IS_LIST = (True,)

def run(self,image,num,seed):

if type(seed) == list and len(seed)==1:
seed=seed[0]

Expand All @@ -1729,9 +1729,11 @@ def run(self,image,num,seed):
grids=splitImage(image,num)

if seed>num:
num=int(seed / 500 * num)-1
num=seed % (num + 1)
else:
num=seed-1

print('#SplitImage',seed)

num=max(0,num)

Expand Down

0 comments on commit 9dc4523

Please sign in to comment.