MCPcopy
hub / github.com/Stability-AI/generative-models / default

Function default

sgm/modules/attention.py:64–67  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

62
63
64def default(val, d):
65 if exists(val):
66 return val
67 return d() if isfunction(d) else d
68
69
70def max_neg_value(t):

Callers 15

__init__Method · 0.70
__init__Method · 0.70
forwardMethod · 0.70
__init__Method · 0.70
forwardMethod · 0.70
__init__Method · 0.50
__init__Method · 0.50
prepare_sampling_loopMethod · 0.50
__call__Method · 0.50
__call__Method · 0.50
__init__Method · 0.50
forwardMethod · 0.50

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected