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 exception on training model in diffusers format #290

Merged
merged 2 commits into from
Mar 19, 2023

Conversation

orenwang
Copy link
Contributor

@orenwang orenwang commented Mar 13, 2023

sd-scripts supports training models in diffusers format, but methods model_hash() and calculate_sha256() are throwing IsADirectoryErrors on model that is not a file.

This PR catches these exceptions and return 'IsADirectory' as hash instead.

@kohya-ss
Copy link
Owner

Thank you for this! Sorry I haven't tested with Diffusers models recently. I will review when I have time.

@kohya-ss kohya-ss changed the base branch from main to dev March 19, 2023 12:51
@kohya-ss kohya-ss merged commit c86bf21 into kohya-ss:dev Mar 19, 2023
@kohya-ss
Copy link
Owner

I've merged with little modification (issue on Windows). Thank you so much!

@orenwang
Copy link
Contributor Author

Sounds good. You are way too kind!

@bmaltais bmaltais mentioned this pull request Mar 22, 2023
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.

2 participants