Skip to content

Commit 2bcff67

Browse files
authored
fix: correct dpm++2s_a second model call (#1435)
1 parent a564fdf commit 2bcff67

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/denoiser.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,8 +953,9 @@ static sd::Tensor<float> sample_dpmpp_2s_ancestral(denoise_cb_t model,
953953
float t_next = t_fn(sigma_down);
954954
float h = t_next - t;
955955
float s = t + 0.5f * h;
956-
sd::Tensor<float> x2 = (sigma_fn(s) / sigma_fn(t)) * x - (exp(-h * 0.5f) - 1) * denoised;
957-
auto denoised2_opt = model(x2, sigmas[i + 1], i + 1);
956+
float sigma_s = sigma_fn(s);
957+
sd::Tensor<float> x2 = (sigma_s / sigma_fn(t)) * x - (exp(-h * 0.5f) - 1) * denoised;
958+
auto denoised2_opt = model(x2, sigma_s, i + 1);
958959
if (denoised2_opt.empty()) {
959960
return {};
960961
}

0 commit comments

Comments
 (0)