MCPcopy
hub / github.com/zai-org/CogVideo / default

Function default

sat/sgm/modules/autoencoding/magvit2_pytorch.py:46–47  ·  view source on GitHub ↗
(v, d)

Source from the content-addressed store, hash-verified

44
45
46def default(v, d):
47 return v if exists(v) else d
48
49
50def safe_get_index(it, ind, default=None):

Callers 15

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

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected