| 33 | Siglip2Preprocessor::~Siglip2Preprocessor() = default; |
| 34 | |
| 35 | std::pair<int64_t, int64_t> Siglip2Preprocessor::compute_pixel_limits() const { |
| 36 | int64_t min_pixels = static_cast<int64_t>(config_.min_image_tokens) * |
| 37 | config_.patch_size * config_.patch_size * |
| 38 | config_.downsample_factor * config_.downsample_factor; |
| 39 | int64_t max_pixels = static_cast<int64_t>(config_.max_image_tokens) * |
| 40 | config_.patch_size * config_.patch_size * |
| 41 | config_.downsample_factor * config_.downsample_factor; |
| 42 | return {min_pixels, max_pixels}; |
| 43 | } |
| 44 | |
| 45 | int Siglip2Preprocessor::round_by_factor(int number, int factor) { |
| 46 | if (factor == 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected