Skip to content

Commit

Permalink
fixed line
Browse files Browse the repository at this point in the history
  • Loading branch information
harvestingmoon committed May 23, 2024
1 parent 7573b63 commit 94dcaba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/minicpmv/minicpmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ std::pair<int, int> get_refine_size(std::pair<int, int> 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<int, int> refine_size = std::make_tuple(best_grid_width * grid_x, best_grid_height * grid_y);

// std::pair<int, int> refine_size = std::make_tuple(best_grid_width * grid_x, best_grid_height * grid_y); (old line)
std::pair<int, int> refine_size = std::make_pair(best_grid_width * grid_x, best_grid_height * grid_y); // (new line)
return refine_size;
}

Expand Down

0 comments on commit 94dcaba

Please sign in to comment.