Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/lucidrains/DALLE-pytorch
/ exists
Function
exists
dalle_pytorch/dalle_pytorch.py:16–17 ·
view source on GitHub ↗
(val)
Source
from the content-addressed store, hash-verified
14
# helpers
15
16
def
exists(val):
17
return
val is not None
18
19
def
default(val, d):
20
return
val
if
exists(val)
else
d
Callers
6
default
Function · 0.70
norm
Method · 0.70
forward
Method · 0.70
generate_images
Method · 0.70
forward_with_cond_scale
Method · 0.70
forward
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected