Skip to content

Commit

Permalink
Late-import scipy.integrate (only required when using LinearMultistep…
Browse files Browse the repository at this point in the history
…Sampler)
  • Loading branch information
akx committed Jul 27, 2023
1 parent 45c443b commit 90904bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sgm/modules/diffusionmodules/sampling_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import torch
from scipy import integrate

from ...util import append_dims

Expand All @@ -10,6 +9,7 @@ def __call__(self, uncond, cond, scale):


def linear_multistep_coeff(order, t, i, j, epsrel=1e-4):
from scipy import integrate # late import to avoid extra dependency
if order - 1 > i:
raise ValueError(f"Order {order} too high for step {i}")

Expand Down

0 comments on commit 90904bb

Please sign in to comment.