Skip to content

Commit 4a15fce

Browse files
authored
Merge pull request #13 from acceleratescience/bugfix/device-issues
Fix device issues in notebooks and source code
2 parents 566a8bd + 932895b commit 4a15fce

File tree

3 files changed

+180
-513
lines changed

3 files changed

+180
-513
lines changed

diffusion_models/ddpm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ def __init__(self, model, optimizer, T: int, start: float, end: float, device: t
1515
end (float): Largest variance
1616
device (torch.device, optional): Device. Defaults to torch.device('cpu')
1717
"""
18-
self.model = model
1918
self.optimizer = optimizer
2019
self.device = device
20+
self.model = model.to(self.device)
2121

2222
self.T = T
2323
self.beta = torch.linspace(start, end, T).to(device)

notebooks/1_VAEs.ipynb

Lines changed: 133 additions & 306 deletions
Large diffs are not rendered by default.

notebooks/5_diffusion_part2.ipynb

Lines changed: 46 additions & 206 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)