We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9357710 commit d60cc24Copy full SHA for d60cc24
rectified_flow_pytorch/rectified_flow.py
@@ -24,6 +24,9 @@ def exists(v):
24
def default(v, d):
25
return v if exists(v) else d
26
27
+def identity(t):
28
+ return t
29
+
30
# tensor helpers
31
32
def append_dims(t, ndims):
@@ -147,8 +150,8 @@ def __init__(
147
150
148
151
# normalizing fn
149
152
- self.data_normalize_fn = data_normalize_fn
- self.data_unnormalize_fn = data_unnormalize_fn
153
+ self.data_normalize_fn = default(data_normalize_fn, identity)
154
+ self.data_unnormalize_fn = default(data_unnormalize_fn, identity)
155
156
@property
157
def device(self):
0 commit comments