Skip to content

Commit 86e26b3

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 883aece commit 86e26b3

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
@@ -1274,7 +1274,7 @@ class StableDiffusionGGML {
12741274
}
12751275

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

0 commit comments

Comments
 (0)