MCPcopy Create free account
hub / github.com/TencentARC/T2I-Adapter / default

Function default

configs/utils.py:55–58  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

53
54
55def default(val, d):
56 if exists(val):
57 return val
58 return d() if isfunction(d) else d
59
60
61def mean_flat(tensor):

Callers

nothing calls this directly

Calls 1

existsFunction · 0.85

Tested by

no test coverage detected