Fix ddim for Mac: #264

This commit is contained in:
comfyanonymous 2023-03-26 00:36:54 -04:00
parent d68350eee5
commit f5365c9c81
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class DDIMSampler(object):
def register_buffer(self, name, attr):
if type(attr) == torch.Tensor:
if attr.device != self.device:
attr = attr.to(self.device)
attr = attr.float().to(self.device)
setattr(self, name, attr)
def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True):