Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #2480

Merged
merged 6 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions kohya_gui/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,12 +1424,11 @@ def validate_model_path(pretrained_model_name_or_path: str) -> bool:
log.info(f"{msg} SUCCESS")
else:
# If not one of the default models, check if it's a valid local path
if not validate_file_path(pretrained_model_name_or_path):
if not validate_file_path(pretrained_model_name_or_path) and not validate_folder_path(pretrained_model_name_or_path):
log.info(f"{msg} FAILURE: not a valid file or folder")
return False

return True


def is_file_writable(file_path: str) -> bool:
"""
Checks if a file is writable.
Expand Down
2 changes: 1 addition & 1 deletion kohya_gui/lora_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def train_model(
if not validate_folder_path(reg_data_dir):
return TRAIN_BUTTON_VISIBLE

if not validate_file_path(resume):
if not validate_folder_path(resume):
return TRAIN_BUTTON_VISIBLE

if not validate_folder_path(train_data_dir):
Expand Down
Loading