MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / round_to_64

Function round_to_64

tools/preprocess/utils.py:73–76  ·  view source on GitHub ↗
(value, round_up=False, divisor=64)

Source from the content-addressed store, hash-verified

71 return abs(w / h - target_ratio)
72
73 def round_to_64(value, round_up=False, divisor=64):
74 if round_up:
75 return divisor * ((value + (divisor - 1)) // divisor)
76 return divisor * (value // divisor)
77
78 possible_sizes = []
79

Callers 1

calculate_new_sizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected