Skip to content

Commit 24529f5

Browse files
committed
tiling: fix edge case
1 parent e75661d commit 24529f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml_extend.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
636636

637637
float tile_overlap_factor_x = (float)(input_tile_size * num_tiles_x - input_width) / (float)(input_tile_size * (num_tiles_x - 1));
638638
if (num_tiles_x <= 2) {
639-
if (input_width == input_tile_size) {
639+
if (input_width <= input_tile_size) {
640640
num_tiles_x = 1;
641641
tile_overlap_factor_x = 0;
642642
} else {
@@ -656,7 +656,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
656656

657657
float tile_overlap_factor_y = (float)(input_tile_size * num_tiles_y - input_height) / (float)(input_tile_size * (num_tiles_y - 1));
658658
if (num_tiles_y <= 2) {
659-
if (input_height == input_tile_size) {
659+
if (input_height <= input_tile_size) {
660660
num_tiles_y = 1;
661661
tile_overlap_factor_y = 0;
662662
} else {

0 commit comments

Comments
 (0)