(self, model, **kwargs)
| 12 | |
| 13 | class 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: |
nothing calls this directly
no test coverage detected