Skip to content

Commit 7a9a6fa

Browse files
authored
Use pretty_progress(time_remainder)
1 parent 6d4c5ca commit 7a9a6fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

denoiser.hpp

+7
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,17 @@ struct FluxFlowDenoiser : public Denoiser {
469469
typedef std::function<ggml_tensor*(ggml_tensor*, float, int)> denoise_cb_t;
470470

471471
static inline void show_step(int i0, int im, int64_t* t0) {
472+
#ifdef SD_SHOW_REMAINING_TIME
473+
int i = i0 + 1;
474+
float t1 = (ggml_time_us() - *t0) / 1000000.f / i;
475+
pretty_progress(i, im, t1, t1 * (im - i));
476+
// LOG_INFO("step %d sampling completed taking %.2fs", i, (t1 - *t0) * 1.0f / 1000000 / i);
477+
#else // SD_SHOW_REMAINING_TIME
472478
int64_t t1 = ggml_time_us();
473479
pretty_progress(i0 + 1, im, (t1 - *t0) / 1000000.f);
474480
// LOG_INFO("step %d sampling completed taking %.2fs", i0 + 1, (t1 - *t0) * 1.0f / 1000000);
475481
*t0 = t1;
482+
#endif // SD_SHOW_REMAINING_TIME
476483
}
477484

478485
// k diffusion reverse ODE: dx = (x - D(x;\sigma)) / \sigma dt; \sigma(t) = t

0 commit comments

Comments
 (0)