From d51e4667a18b12de7a62baba565cbc6fb932fe0b Mon Sep 17 00:00:00 2001 From: Juha Jeronen Date: Sat, 20 Jan 2024 02:44:24 +0200 Subject: [PATCH] render time now excludes postprocessing time, reported separately Total render time per frame = reported render time + reported postproc time --- talkinghead/tha3/app/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/talkinghead/tha3/app/app.py b/talkinghead/tha3/app/app.py index 8b5d787..032abf3 100644 --- a/talkinghead/tha3/app/app.py +++ b/talkinghead/tha3/app/app.py @@ -1111,6 +1111,8 @@ class Animator: time_now = time.time_ns() if self.source_image is not None: render_elapsed_sec = (time_now - time_render_start) / 10**9 + # remove the average per-frame postprocessing time, to measure render time only + render_elapsed_sec -= self.postprocessor.render_duration_statistics.average() self.render_duration_statistics.add_datapoint(render_elapsed_sec) # Set the new rendered frame as the output image, and mark the frame as ready for consumption.