File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1130,11 +1130,12 @@ class StableDiffusionGGML {
11301130 }
11311131 struct ggml_tensor * denoised = ggml_dup_tensor (work_ctx, x);
11321132
1133+ int64_t t0 = ggml_time_us ();
1134+
11331135 auto denoise = [&](ggml_tensor* input, float sigma, int step) -> ggml_tensor* {
1134- if (step == 1 ) {
1136+ if (step == 1 || step == - 1 ) {
11351137 pretty_progress (0 , (int )steps, 0 );
11361138 }
1137- int64_t t0 = ggml_time_us ();
11381139
11391140 std::vector<float > scaling = denoiser->get_scalings (sigma);
11401141 GGML_ASSERT (scaling.size () == 3 );
@@ -1288,8 +1289,9 @@ class StableDiffusionGGML {
12881289 }
12891290
12901291 int64_t t1 = ggml_time_us ();
1291- if (step > 0 ) {
1292- pretty_progress (step, (int )steps, (t1 - t0) / 1000000 .f );
1292+ if (step > 0 || step == -(int )steps) {
1293+ int showstep = std::abs (step);
1294+ pretty_progress (showstep, (int )steps, (t1 - t0) / 1000000 .f / showstep);
12931295 // LOG_INFO("step %d sampling completed taking %.2fs", step, (t1 - t0) * 1.0f / 1000000);
12941296 }
12951297 if (denoise_mask != nullptr ) {
You can’t perform that action at this time.
0 commit comments