Compare commits

..
4 Commits
Author SHA1 Message Date
wassname edc6d5136a Update denoising_diffusion_pytorch_1d.py 2022-12-22 11:00:56 +08:00
wassname 207d23af86 Update denoising_diffusion_pytorch.py
Shouldn't eta be 0 for DDIM sampling? In the DDIM paper in section 5.1 they mention the eta=0 is DDIM, and eta=1 approximates the normal DDPM. They also use [eta=0](https://github.com/openai/improved-diffusion/blob/e94489283bb876ac1477d5dd7709bbbd2d9902ce/improved_diffusion/gaussian_diffusion.py#L487) in the openai implementation of DDIM.
2022-12-22 10:57:30 +08:00
Phil Wang cf4f44909f 0.1.5 2022-12-21 08:35:59 -08:00
Phil Wang a7f2d670bb always set results_folder on Trainer 2022-12-21 08:34:34 -08:00
3 changed files with 5 additions and 5 deletions
@@ -431,7 +431,7 @@ class GaussianDiffusion(nn.Module):
beta_schedule = 'cosine', beta_schedule = 'cosine',
p2_loss_weight_gamma = 0., # p2 loss weight, from https://arxiv.org/abs/2204.00227 - 0 is equivalent to weight of 1 across time - 1. is recommended p2_loss_weight_gamma = 0., # p2 loss weight, from https://arxiv.org/abs/2204.00227 - 0 is equivalent to weight of 1 across time - 1. is recommended
p2_loss_weight_k = 1, p2_loss_weight_k = 1,
ddim_sampling_eta = 1. ddim_sampling_eta = 0.
): ):
super().__init__() super().__init__()
assert not (type(self) == GaussianDiffusion and model.channels != model.out_dim) assert not (type(self) == GaussianDiffusion and model.channels != model.out_dim)
@@ -810,8 +810,8 @@ class Trainer(object):
if self.accelerator.is_main_process: if self.accelerator.is_main_process:
self.ema = EMA(diffusion_model, beta = ema_decay, update_every = ema_update_every) self.ema = EMA(diffusion_model, beta = ema_decay, update_every = ema_update_every)
self.results_folder = Path(results_folder) self.results_folder = Path(results_folder)
self.results_folder.mkdir(exist_ok = True) self.results_folder.mkdir(exist_ok = True)
# step counter state # step counter state
@@ -414,7 +414,7 @@ class GaussianDiffusion1D(nn.Module):
beta_schedule = 'cosine', beta_schedule = 'cosine',
p2_loss_weight_gamma = 0., p2_loss_weight_gamma = 0.,
p2_loss_weight_k = 1, p2_loss_weight_k = 1,
ddim_sampling_eta = 1. ddim_sampling_eta = 0.
): ):
super().__init__() super().__init__()
self.model = model self.model = model
+1 -1
View File
@@ -1 +1 @@
__version__ = '0.1.0' __version__ = '0.1.5'