MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / ensure_divide

Function ensure_divide

sft/dataset.py:499–500  ·  view source on GitHub ↗
(length, patch_size)

Source from the content-addressed store, hash-verified

497
498
499def ensure_divide(length, patch_size):
500 return max(round(length / patch_size) * patch_size, patch_size)
501
502
503def find_best_resize(original_size, scale_resolution, patch_size, allow_upscale=False):

Callers 2

find_best_resizeFunction · 0.85
get_refine_sizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected