MCPcopy Create free account
hub / github.com/cactus-compute/cactus / compute_pixel_limits

Method compute_pixel_limits

cactus/engine/engine_image.cpp:35–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33Siglip2Preprocessor::~Siglip2Preprocessor() = default;
34
35std::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
45int Siglip2Preprocessor::round_by_factor(int number, int factor) {
46 if (factor == 0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected