Skip to content

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented Mar 5, 2023

This fixes the crash that was occurring when trying to load a legacy checkpoint file.

Note that this PR includes commits from #2867 to avoid diffusers files from re-downloading at startup time.

Copy link
Contributor

@JPPhoto JPPhoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code fails when moving a file from diffusers to hub:

NotADirectoryError: [Errno 20] Not a directory:
PosixPath('/home/jsp/InvokeAI/models/diffusers/6b24dfca04e9eb5e308587eb12feb6c18adafbd90d21974ccf5b4bb17f2b4190.a8a930da
e638521a74d7ad5f62383f034387cc398c567adcead8c7e7366f67cc.json')

The error is thrown because migrate_models in model_manager.py tries to remove a directory but this is a file. The file doesn't appear to be moved properly, either.

@lstein
Copy link
Collaborator Author

lstein commented Mar 5, 2023

This code fails when moving a file from diffusers to hub:

NotADirectoryError: [Errno 20] Not a directory:
PosixPath('/home/jsp/InvokeAI/models/diffusers/6b24dfca04e9eb5e308587eb12feb6c18adafbd90d21974ccf5b4bb17f2b4190.a8a930da
e638521a74d7ad5f62383f034387cc398c567adcead8c7e7366f67cc.json')

The error is thrown because migrate_models in model_manager.py tries to remove a directory but this is a file. The file doesn't appear to be moved properly, either.

I've fixed this on # 2867 and tested with a variety of directories, files and symlinks.

@lstein lstein requested a review from JPPhoto March 5, 2023 17:37
@lstein lstein merged commit 126cba2 into main Mar 6, 2023
@lstein lstein deleted the bugfix/reenable-ckpt-conversion-to-ram branch March 6, 2023 03:57
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