class_docstr: DPM-Solver. See https://arxiv.org/abs/2206.00927.
class_docstr_tok: ["DPM-Solver",".","See","https",":","\/\/arxiv.org\/abs\/2206.00927","."]
code: def eps(self, eps_cache, key, x, t, *args, **kwargs):
      if key in eps_cache:
          return eps_cache[key], eps_cache
      sigma = self.sigma(t) * x.new_ones([x.shape[0]])
      eps = (
          x - self.model(x, sigma, *args, **self.extra_args, **kwargs)
      ) / self.sigma(t)
      if self.eps_callback is not None:
          self.eps_callback()
      return eps, {key: eps, **eps_cache}
  
imports: import math
  import torch
  import torchsde
  from scipy import integrate
  from torch import nn
  from torchdiffeq import odeint
  from tqdm.auto import tqdm, trange
label_desc: Use image node_id 4 for calling the DPMSolver obj's underlying member method code with example usage: obj.eps(eps_cache, key, x, t) and returns: eps,  dict, eps_cache,  eps_cache