also make sure grad scaler actually exists in the saved pt file

This commit is contained in:
Phil Wang
2022-07-06 11:48:04 -07:00
parent 6b56af08a2
commit 0248b5e4d3
2 changed files with 2 additions and 2 deletions
@@ -694,7 +694,7 @@ class Trainer(object):
self.step = data['step']
self.ema.load_state_dict(data['ema'])
if exists(self.accelerator.scaler):
if exists(self.accelerator.scaler) and exists(data['scaler']):
self.accelerator.scaler.load_state_dict(data['scaler'])
def train(self):
+1 -1
View File
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
name = 'denoising-diffusion-pytorch',
packages = find_packages(),
version = '0.24.0',
version = '0.24.1',
license='MIT',
description = 'Denoising Diffusion Probabilistic Models - Pytorch',
author = 'Phil Wang',