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

Add cache-info.py utility #587

Closed
wants to merge 2 commits into from
Closed

Conversation

ppbrown
Copy link
Contributor

@ppbrown ppbrown commented Nov 23, 2024

This shows association between cache directory, and backend data directory

cache directory, and backend data directory
@pbrownrobo
Copy link

FYI, output looks like:

python cache-info.py /data/OneTrainer/workspace-cache/run/image/6041f3ef3e050533dd0a7104500abeca0dc1751a98005abfcf06ccd7bc61994f |head -4
Unique directories found:
/data2/CC/CC8M/CC8m-woman-40k/00000
/data2/CC/CC8M/CC8m-woman-40k/00001
/data2/CC/CC8M/CC8m-woman-40k/00002

@Nerogar
Copy link
Owner

Nerogar commented Nov 24, 2024

There are quite a few issues:

  • The script doesn't follow the usual import structure. It should start with.
    from util.import_util import script_imports
    script_imports()
    
  • Parameters should be parsed using a subclass of BaseArgs (see TrainArgs.py for an example usage), not by accessing sys.argv
  • You can't assume that image_path always exists in the cache dict. The cache structure depends on the model, and future supported models (like text2audio, text2video or something entirely different) won't have that key.
  • It only looks at variation-0. You already mentioned that in the comment, but that's not a very useful limitation.

@ppbrown
Copy link
Contributor Author

ppbrown commented Nov 24, 2024 via email

@Nerogar
Copy link
Owner

Nerogar commented Dec 28, 2024

Closing this, as there is no recent activity. If you still want to add a script like this, please try to follow the existing structure and think about how to integrate it in a more generic way.

@Nerogar Nerogar closed this Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants