Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
•
1edd28a
1
Parent(s):
b783390
Update ldm/models/diffusion/ddim.py
Browse files
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("
|
20 |
-
attr = attr.to(torch.device("
|
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):
|