MCPcopy Index your code
hub / github.com/CompVis/diff2flow / get_vector_field_from_v

Method get_vector_field_from_v

diff2flow/flow_obj.py:156–167  ·  view source on GitHub ↗

v is the SD v-parameterized vector field with v = sqrt(alpha_cumprod) * eps - sqrt(1 - alpha_cumprod) * z the FM vector field is defined as z - eps First of all convert the x_t from the rectified flow trajectory to the original diffusion trajectory Then calculate th

(self, v, x_t, t)

Source from the content-addressed store, hash-verified

154 )
155
156 def get_vector_field_from_v(self, v, x_t, t):
157 """
158 v is the SD v-parameterized vector field with v = sqrt(alpha_cumprod) * eps - sqrt(1 - alpha_cumprod) * z
159 the FM vector field is defined as z - eps
160
161 First of all convert the x_t from the rectified flow trajectory to the original diffusion trajectory
162 Then calculate the vector field from the v-parameterized vector field
163 """
164 z_pred = self.predict_start_from_z_and_v(x_t, t, v)
165 eps_pred = self.predict_eps_from_z_and_v(x_t, t, v)
166 vector_field = z_pred - eps_pred # z - eps
167 return vector_field
168
169 def get_vector_field_from_eps(self, noise, x_t, t):
170 """

Callers 1

sample_vtMethod · 0.95

Calls 2

Tested by

no test coverage detected