Skip to content

Commit

Permalink
Merge pull request #2079 from bmaltais/dev
Browse files Browse the repository at this point in the history
v23.0.8
  • Loading branch information
bmaltais authored Mar 12, 2024
2 parents 16336e8 + 890e521 commit a2206fe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v23.0.7
v23.0.8
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The GUI allows you to set the training parameters and generate and run the requi
- [No module called tkinter](#no-module-called-tkinter)
- [SDXL training](#sdxl-training)
- [Change History](#change-history)
- [2024/03/11 (v23.0.8)](#20240311-v2308)
- [2024/03/11 (v23.0.7)](#20240311-v2307)
- [2024/03/11 (v23.0.6)](#20240311-v2306)
- [2024/03/11 (v23.0.5)](#20240311-v2305)
Expand Down Expand Up @@ -366,6 +367,10 @@ The documentation in this section will be moved to a separate document later.
## Change History
### 2024/03/11 (v23.0.8)
- Add the ability to create outout and logs folder if it does not exist

Check warning on line 372 in README.md

View workflow job for this annotation

GitHub Actions / build

"outout" should be "output".

Check warning on line 372 in README.md

View workflow job for this annotation

GitHub Actions / build

"outout" should be "output".
### 2024/03/11 (v23.0.7)
- Fix minor issues related to functions and file path
Expand Down
19 changes: 15 additions & 4 deletions kohya_gui/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,18 +1321,29 @@ def validate_paths(headless:bool = False, **kwargs):

if output_dir != None:
log.info(f"Validating output folder path {output_dir} existence...")
if output_dir == "" or not os.path.exists(output_dir):
log.error("...output folder path is missing or invalid")
if output_dir == "":
log.error("...output folder path is missing")
return False
elif not os.path.exists(output_dir):
try:
os.makedirs(output_dir, exist_ok=True) # Create the directory, no error if it already exists
log.info(f"...created folder at {output_dir}")
except Exception as e:
log.error(f"...failed to create output folder: {e}")
return False
else:
log.info("...valid")

if logging_dir != None:
if logging_dir != "":
log.info(f"Validating logging folder path {logging_dir} existence...")
if not os.path.exists(logging_dir):
log.error("...logging folder path is missing or invalid")
return False
try:
os.makedirs(logging_dir, exist_ok=True) # Create the directory, no error if it already exists
log.info(f"...created folder at {logging_dir}")
except Exception as e:
log.error(f"...failed to create logging folder: {e}")
return False
else:
log.info("...valid")
else:
Expand Down

0 comments on commit a2206fe

Please sign in to comment.