From ad2b22a41da6ff247079952a969845f4b848ec71 Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Tue, 25 Aug 2026 09:53:15 -0300 Subject: [PATCH] sd: set step as 0 for the first noisy preview (#2416) The initial noisy preview is reported before denoising, so it shows the ongoing step number; but we immediately switch to denoised previews or progress callback info, which instead show concluded steps. So we currently report step '1' during the first two inference steps. --- otherarch/sdcpp/sdtype_adapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index ac0de940a..7906186c0 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -1787,7 +1787,7 @@ static void step_callback(int step, int frame_count, sd_image_t* image, bool is_ set_preview_images(0); } } - geninfo.gendata.step = step; + geninfo.gendata.step = is_noisy ? 0 : step; geninfo.gendata.step_time = step_time; should_encode_preview = !is_noisy && geninfo.preview_enabled; }