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

fix: correctly sort files, display deepest dir level first #1784

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

mashb1t
Copy link
Collaborator

@mashb1t mashb1t commented Jan 7, 2024

There is an issue in the file sorting, which has to do with the condition of the lambda. os.sep returns correctly, but the sorting of the else condition just appends to the end and beginning, which is wrong.
This PR implements sorting for files when walking as well as topdown=False to display subfolders first.

Closes #1618
Relates to #1517

before:
Screenshot 2024-01-07 at 14 17 19

after:
Screenshot 2024-01-07 at 14 16 15

@mashb1t mashb1t added the Size S small change, basically no testing needed label Feb 9, 2024
@mashb1t mashb1t changed the base branch from main to develop February 10, 2024 18:01
@mashb1t mashb1t merged commit 98ba1d5 into lllyasviel:develop Feb 10, 2024
@mashb1t mashb1t deleted the hotfix/fix-file-sort branch February 12, 2024 20:56
@wmlele
Copy link

wmlele commented Mar 3, 2024

Sort of related to this: is there any reason (security? isolation?) for not following symlinks to directories (followlinks=True) in the os.walk() call?

I don't think I am the only one to have an organized model store with lots of categories and symlinks to them. If nothing prevents it, could it please be enabled?

@mashb1t
Copy link
Collaborator Author

mashb1t commented Mar 3, 2024

@wmlele path_checkpoints and path_loras can now be an array in the config, basically there is no need for symlinks now. Please check if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size S small change, basically no testing needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model list in alphabetical order
2 participants