From 711d7dedd77285c3773fd8a731b3e5ebeb46dcc7 Mon Sep 17 00:00:00 2001 From: Eugene Denisenko Date: Sun, 21 Apr 2024 21:36:51 +0500 Subject: [PATCH] Progressbar Fix --- ggml_extend.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml_extend.hpp b/ggml_extend.hpp index 6dbbfaa99..f20606640 100644 --- a/ggml_extend.hpp +++ b/ggml_extend.hpp @@ -454,7 +454,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const ggml_tensor* input_tile = ggml_new_tensor_4d(tiles_ctx, GGML_TYPE_F32, tile_size, tile_size, input->ne[2], 1); ggml_tensor* output_tile = ggml_new_tensor_4d(tiles_ctx, GGML_TYPE_F32, tile_size * scale, tile_size * scale, output->ne[2], 1); on_processing(input_tile, NULL, true); - int num_tiles = (input_width * input_height) / (non_tile_overlap * non_tile_overlap); + int num_tiles = ceil((float)input_width / non_tile_overlap) * ceil((float)input_height / non_tile_overlap); LOG_INFO("processing %i tiles", num_tiles); pretty_progress(1, num_tiles, 0.0f); int tile_count = 1;