From 4af8921c8d1f2f2f736bc68435464601f72b06f8 Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Fri, 17 Apr 2026 18:23:26 -0300 Subject: [PATCH] fix: correct dpm++2s_a second model call --- src/denoiser.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/denoiser.hpp b/src/denoiser.hpp index e4303f58b..7399e8611 100644 --- a/src/denoiser.hpp +++ b/src/denoiser.hpp @@ -953,8 +953,9 @@ static sd::Tensor sample_dpmpp_2s_ancestral(denoise_cb_t model, float t_next = t_fn(sigma_down); float h = t_next - t; float s = t + 0.5f * h; - sd::Tensor x2 = (sigma_fn(s) / sigma_fn(t)) * x - (exp(-h * 0.5f) - 1) * denoised; - auto denoised2_opt = model(x2, sigmas[i + 1], i + 1); + float sigma_s = sigma_fn(s); + sd::Tensor x2 = (sigma_s / sigma_fn(t)) * x - (exp(-h * 0.5f) - 1) * denoised; + auto denoised2_opt = model(x2, sigma_s, i + 1); if (denoised2_opt.empty()) { return {}; }