Skip to content

Commit bfd776e

Browse files
committed
remove nan check during diffusion
1 parent 90850f2 commit bfd776e

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

sbi/inference/posteriors/vector_field_posterior.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,6 @@ def _sample_via_diffusion(
340340
# Concatenate all batches and ensure we return exactly the requested number
341341
samples = torch.cat(all_samples, dim=0)[:total_samples_needed]
342342

343-
# Check for NaN values
344-
if torch.isnan(samples).any():
345-
raise RuntimeError(
346-
"NaN values detected during diffusion sampling. This may indicate"
347-
" numerical instability in the vector field or improper time "
348-
"scheduling."
349-
)
350-
351343
return samples
352344

353345
def sample_via_ode(

0 commit comments

Comments
 (0)