MCPcopy Create free account
hub / github.com/294coder/Dif-PAN / model_fn

Method model_fn

solver/dpm_solver.py:452–459  ·  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

450 return x0
451
452 def model_fn(self, x, t):
453 """
454 Convert the model to the noise prediction model or the data prediction model.
455 """
456 if self.algorithm_type == "dpmsolver++":
457 return self.data_prediction_fn(x, t)
458 else:
459 return self.noise_prediction_fn(x, t)
460
461 def get_time_steps(self, skip_type, t_T, t_0, N, device):
462 """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