Skip to content

Commit 2ce74f0

Browse files
committed
disable clip on x by default
1 parent 0f7b3f5 commit 2ce74f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bayesflow/experimental/diffusion_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def velocity(
493493
time: float | Tensor,
494494
conditions: Tensor = None,
495495
training: bool = False,
496-
clip_x: bool = True,
496+
clip_x: bool = False,
497497
) -> Tensor:
498498
# calculate the current noise level and transform into correct shape
499499
log_snr_t = expand_right_as(self.noise_schedule.get_log_snr(t=time, training=training), xz)
@@ -668,7 +668,7 @@ def compute_metrics(
668668
pred = self.output_projector(self.subnet(xtc, training=training), training=training)
669669

670670
x_pred = self.convert_prediction_to_x(
671-
pred=pred, z=diffused_x, alpha_t=alpha_t, sigma_t=sigma_t, log_snr_t=log_snr_t, clip_x=True
671+
pred=pred, z=diffused_x, alpha_t=alpha_t, sigma_t=sigma_t, log_snr_t=log_snr_t, clip_x=False
672672
)
673673
# convert x to epsilon prediction
674674
out = (alpha_t * diffused_x - x_pred) / sigma_t

0 commit comments

Comments
 (0)