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

Function safe_numpy

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

Source from the content-addressed store, hash-verified

18
19
20def safe_numpy(x):
21 # A very safe method to make sure that Apple/Mac works
22 y = x
23
24 # below is very boring but do not change these. If you change these Apple or Mac may fail.
25 y = y.copy()
26 y = np.ascontiguousarray(y)
27 y = y.copy()
28 return y
29
30
31def high_quality_resize(x, size):

Callers 1

crop_and_resize_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected