From a79d40519ca3f07d09607c5a77db64dd56c774be Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 23 Mar 2023 21:43:21 -0400 Subject: [PATCH] fix batch generation logfile name to be compatible with Windows OS - `invokeai-batch --invoke` was created a time-stamped logfile with colons in its name, which is a Windows no-no. This corrects the problem by writing the timestamp out as "13-06-2023_8-35-10" - Closes #3005 --- ldm/invoke/dynamic_prompts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/invoke/dynamic_prompts.py b/ldm/invoke/dynamic_prompts.py index c196ce7c33..de02c55b56 100755 --- a/ldm/invoke/dynamic_prompts.py +++ b/ldm/invoke/dynamic_prompts.py @@ -157,7 +157,7 @@ def _run_invoke( ): pid = os.getpid() logdir.mkdir(parents=True, exist_ok=True) - logfile = Path(logdir, f'{time.strftime("%Y-%m-%d-%H:%M:%S")}-pid={pid}.txt') + logfile = Path(logdir, f'{time.strftime("%Y-%m-%d_%H-%M-%S")}-pid={pid}.txt') print( f">> Process {pid} running on GPU {gpu}; logging to {logfile}", file=sys.stderr )