MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / model_fn

Method model_fn

ldm/models/diffusion/dpm_solver/dpm_solver.py:367–374  ·  view source on GitHub ↗

Convert the model to the noise prediction model or the data prediction model.

(self, x, t)

Source from the content-addressed store, hash-verified

365 return x0
366
367 def model_fn(self, x, t):
368 """
369 Convert the model to the noise prediction model or the data prediction model.
370 """
371 if self.predict_x0:
372 return self.data_prediction_fn(x, t)
373 else:
374 return self.noise_prediction_fn(x, t)
375
376 def get_time_steps(self, skip_type, t_T, t_0, N, device):
377 """Compute the intermediate time steps for sampling.

Calls 2

data_prediction_fnMethod · 0.95
noise_prediction_fnMethod · 0.95

Tested by

no test coverage detected