Skip to content

Commit

Permalink
address a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 7, 2024
1 parent 7c1a4cf commit 403f9e6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion denoising_diffusion_pytorch/denoising_diffusion_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def load(self, milestone):
accelerator = self.accelerator
device = accelerator.device

data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device)
data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device, weights_only=True)

model = self.accelerator.unwrap_model(self.model)
model.load_state_dict(data['model'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def load(self, milestone):
accelerator = self.accelerator
device = accelerator.device

data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device)
data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device, weights_only=True)

model = self.accelerator.unwrap_model(self.model)
model.load_state_dict(data['model'])
Expand Down
2 changes: 1 addition & 1 deletion denoising_diffusion_pytorch/guided_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ def load(self, milestone):
accelerator = self.accelerator
device = accelerator.device

data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device)
data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device, weights_only=True)

model = self.accelerator.unwrap_model(self.model)
model.load_state_dict(data['model'])
Expand Down
2 changes: 1 addition & 1 deletion denoising_diffusion_pytorch/repaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ def load(self, milestone):
accelerator = self.accelerator
device = accelerator.device

data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device)
data = torch.load(str(self.results_folder / f'model-{milestone}.pt'), map_location=device, weights_only=True)

model = self.accelerator.unwrap_model(self.model)
model.load_state_dict(data['model'])
Expand Down
2 changes: 1 addition & 1 deletion denoising_diffusion_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.18'
__version__ = '2.1.0'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'pillow',
'pytorch-fid',
'scipy',
'torch',
'torch>=2.0',
'torchvision',
'tqdm'
],
Expand Down

0 comments on commit 403f9e6

Please sign in to comment.