From 94dcaba6464b812ab8924a4e3e2febcbeb8d1652 Mon Sep 17 00:00:00 2001 From: harvestingmoon Date: Fri, 24 May 2024 05:27:04 +0800 Subject: [PATCH] fixed line --- examples/minicpmv/minicpmv.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/minicpmv/minicpmv.cpp b/examples/minicpmv/minicpmv.cpp index d0c17bd537249..a885d8f19b201 100644 --- a/examples/minicpmv/minicpmv.cpp +++ b/examples/minicpmv/minicpmv.cpp @@ -392,13 +392,13 @@ std::pair get_refine_size(std::pair original_size, std::pair int grid_width = refine_width / grid_x; int grid_height = refine_height / grid_y; - auto best_grid_size = find_best_resize(std::make_tuple(grid_width, grid_height), scale_resolution, patch_size, allow_upscale); - + // auto best_grid_size = find_best_resize(std::make_tuple(grid_width, grid_height), scale_resolution, patch_size, allow_upscale); (old line) + auto best_grid_size = find_best_resize(std::make_pair(grid_width, grid_height), scale_resolution, patch_size, allow_upscale); // (new line) => fixes conversion for make_tuple to make_pair int best_grid_width, best_grid_height; std::tie(best_grid_width, best_grid_height) = best_grid_size; - std::pair refine_size = std::make_tuple(best_grid_width * grid_x, best_grid_height * grid_y); - + // std::pair refine_size = std::make_tuple(best_grid_width * grid_x, best_grid_height * grid_y); (old line) + std::pair refine_size = std::make_pair(best_grid_width * grid_x, best_grid_height * grid_y); // (new line) return refine_size; }