MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / __init__

Method __init__

ldm/models/diffusion/dpm_solver/sampler.py:14–18  ·  view source on GitHub ↗
(self, model, **kwargs)

Source from the content-addressed store, hash-verified

12
13class DPMSolverSampler(object):
14 def __init__(self, model, **kwargs):
15 super().__init__()
16 self.model = model
17 to_torch = lambda x: x.clone().detach().to(torch.float32).to(model.device)
18 self.register_buffer('alphas_cumprod', to_torch(model.alphas_cumprod))
19
20 def register_buffer(self, name, attr):
21 if type(attr) == torch.Tensor:

Callers

nothing calls this directly

Calls 1

register_bufferMethod · 0.95

Tested by

no test coverage detected