From 493f6e6d9c201c6edc4b777fb5618d039f6953a2 Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Tue, 18 Aug 2026 07:18:58 -0300 Subject: [PATCH] sd: fix progress report for second order samplers (#2403) Each first half step is reported as negative. --- otherarch/sdcpp/sdtype_adapter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index 6b7c4cca3..ac0de940a 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -308,6 +308,7 @@ static inline double get_time_delta(const std::chrono::steady_clock::time_point& static void progress_callback(int step, int steps, float time, void* data) { + step = step < 0 ? -step : step; (void) data; const char* phase = "Encoding"; { @@ -1771,6 +1772,7 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) static void step_callback(int step, int frame_count, sd_image_t* image, bool is_noisy, void* data) { + step = step < 0 ? -step : step; std::lock_guard lock(geninfo.mux); double step_time = get_time_delta(geninfo.start_time);