MCPcopy
hub / github.com/huchenlei/ComfyUI-layerdiffuse / safeint

Function safeint

lib_layerdiffusion/utils.py:56–57  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

54 k1 = float(w) / old_w
55
56 def safeint(x):
57 return int(np.round(x))
58
59 if resize_mode == ResizeMode.RESIZE_AND_FILL:
60 k = min(k0, k1)

Callers 1

crop_and_resize_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected