From 6d16f6853ed47298f0e5ea2c799e617f3e33ed1a Mon Sep 17 00:00:00 2001 From: Eugene <130867375+ring-c@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:59:46 +0500 Subject: [PATCH] fix: correct upscale progressbar (#232) --- ggml_extend.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml_extend.hpp b/ggml_extend.hpp index 6dbbfaa..f206066 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;