Skip to content

Commit

Permalink
fix batch generation logfile name to be compatible with Windows OS (#…
Browse files Browse the repository at this point in the history
…3018)

- The command `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
  • Loading branch information
lstein authored Mar 24, 2023
2 parents 5f2a6f2 + 7377855 commit 1806bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldm/invoke/dynamic_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 1806bfb

Please sign in to comment.