fix: avoid crash with VAE tiling and certain image sizes (#1090)

This commit is contained in:
Wagner Bruna 2025-12-15 12:51:40 -03:00 committed by GitHub
parent 43a70e819b
commit 200cb6f2ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -848,8 +848,6 @@ __STATIC_INLINE__ void sd_tiling_non_square(ggml_tensor* input,
LOG_DEBUG("num tiles : %d, %d ", num_tiles_x, num_tiles_y);
LOG_DEBUG("optimal overlap : %f, %f (targeting %f)", tile_overlap_factor_x, tile_overlap_factor_y, tile_overlap_factor);
GGML_ASSERT(input_width % 2 == 0 && input_height % 2 == 0 && output_width % 2 == 0 && output_height % 2 == 0); // should be multiple of 2
int tile_overlap_x = (int32_t)(p_tile_size_x * tile_overlap_factor_x);
int non_tile_overlap_x = p_tile_size_x - tile_overlap_x;