Skip to content

Commit 852adcc

Browse files
committed
omit progress calls on half steps to avoid oscillation
The progress call on each half step would increase the time without increasing the step count, making the average go up; it would then go down again on the whole step update.
1 parent 879bbc1 commit 852adcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ class StableDiffusionGGML {
12891289
}
12901290

12911291
int64_t t1 = ggml_time_us();
1292-
if (step != 0) {
1292+
if (step > 0 || step == -(int)steps) {
12931293
int showstep = std::abs(step);
12941294
pretty_progress(showstep, (int)steps, (t1 - t0) / 1000000.f / showstep);
12951295
// LOG_INFO("step %d sampling completed taking %.2fs", step, (t1 - t0) * 1.0f / 1000000);

0 commit comments

Comments
 (0)