mirror of
https://github.com/wassname/denoising-diffusion-pytorch.git
synced 2026-09-09 11:21:11 +08:00
also make sure grad scaler actually exists in the saved pt file
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user