Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Improve the log time function for 10 minute + renders (#6207)

Lucas - BLOCK3331ca603ccbc4
diff --git a/main.py b/main.py
index c8c4194d4..79a652578 100644
--- a/main.py
+++ b/main.py
@@ -185,7 +185,13 @@ def prompt_worker(q, server_instance):
current_time = time.perf_counter()
execution_time = current_time - execution_start_time
- logging.info("Prompt executed in {:.2f} seconds".format(execution_time))
+
+ # Log Time in a more readable way after 10 minutes
+ if execution_time > 600:
+ execution_time = time.strftime("%H:%M:%S", time.gmtime(execution_time))
+ logging.info(f"Prompt executed in {execution_time}")
+ else:
+ logging.info("Prompt executed in {:.2f} seconds".format(execution_time))
flags = q.get_flags()
free_memory = flags.get("free_memory", False)