MCPcopy
hub / github.com/lllyasviel/sd-forge-layerdiffuse / safe_numpy

Function safe_numpy

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

Source from the content-addressed store, hash-verified

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

Callers 1

crop_and_resize_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected