extra insurance that diffusion prior is on the correct device, when using trainer with accelerator or device was given

This commit is contained in:
Phil Wang
2022-07-07 10:08:33 -07:00
parent 46be8c32d3
commit ec7cab01d9
2 changed files with 2 additions and 1 deletions

View File

@@ -192,6 +192,7 @@ class DiffusionPriorTrainer(nn.Module):
self.device = diffusion_prior_device
else:
self.device = accelerator.device if exists(accelerator) else device
diffusion_prior.to(self.device)
# save model

View File

@@ -1 +1 @@
__version__ = '0.16.16'
__version__ = '0.16.17'