Skip to content

Commit 6d16f68

Browse files
authored
fix: correct upscale progressbar (#232)
1 parent 036ba9e commit 6d16f68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml_extend.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
454454
ggml_tensor* input_tile = ggml_new_tensor_4d(tiles_ctx, GGML_TYPE_F32, tile_size, tile_size, input->ne[2], 1);
455455
ggml_tensor* output_tile = ggml_new_tensor_4d(tiles_ctx, GGML_TYPE_F32, tile_size * scale, tile_size * scale, output->ne[2], 1);
456456
on_processing(input_tile, NULL, true);
457-
int num_tiles = (input_width * input_height) / (non_tile_overlap * non_tile_overlap);
457+
int num_tiles = ceil((float)input_width / non_tile_overlap) * ceil((float)input_height / non_tile_overlap);
458458
LOG_INFO("processing %i tiles", num_tiles);
459459
pretty_progress(1, num_tiles, 0.0f);
460460
int tile_count = 1;

0 commit comments

Comments
 (0)