RamAnanth1 commited on
Commit
1edd28a
1 Parent(s): b783390

Update ldm/models/diffusion/ddim.py

Browse files
Files changed (1) hide show
  1. ldm/models/diffusion/ddim.py +2 -2
ldm/models/diffusion/ddim.py CHANGED
@@ -16,8 +16,8 @@ class DDIMSampler(object):
16
 
17
  def register_buffer(self, name, attr):
18
  if type(attr) == torch.Tensor:
19
- if attr.device != torch.device("cuda"):
20
- attr = attr.to(torch.device("cuda"))
21
  setattr(self, name, attr)
22
 
23
  def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True):
 
16
 
17
  def register_buffer(self, name, attr):
18
  if type(attr) == torch.Tensor:
19
+ if attr.device != torch.device("cpu"):
20
+ attr = attr.to(torch.device("cpu"))
21
  setattr(self, name, attr)
22
 
23
  def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True):