Skip to content

Commit

Permalink
fix self conditioning
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 22, 2024
1 parent 242e4b6 commit 32310c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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 @@ -785,7 +785,7 @@ def p_losses(self, x_start, t, noise = None, offset_noise_strength = None):

x_self_cond = None
if self.self_condition and random() < 0.5:
with torch.inference_mode():
with torch.no_grad():

This comment has been minimized.

Copy link
@ChoCho66

ChoCho66 Jan 23, 2024

Would a modification in this instance bring about any notable differences?

x_self_cond = self.model_predictions(x, t).pred_x_start
x_self_cond.detach_()

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__ = '1.9.5'
__version__ = '1.9.6'

0 comments on commit 32310c3

Please sign in to comment.