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

Prevent crash when converting models from within CLI using legacy model URL #2846

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented Mar 2, 2023

  • Crash would occur at the end of this sequence:

    • launch CLI
    • !convert <URL pointing to a legacy ckpt file>
    • Answer "Y" when asked to delete original .ckpt file
  • This commit modifies model_manager.heuristic_import() to silently delete the downloaded legacy file after it has been converted into a diffusers model. The user is no longer asked to approve deletion.

NB: This should be cherry-picked into main once refactor is done.

- Crash would occur at the end of this sequence:
  - launch CLI
  - !convert <URL pointing to a legacy ckpt file>
  - Answer "Y" when asked to delete original .ckpt file

- This commit modifies model_manager.heuristic_import()
  to silently delete the downloaded legacy file after
  it has been converted into a diffusers model. The user
  is no longer asked to approve deletion.

NB: This should be cherry-picked into main once refactor
is done.
@lstein lstein requested review from hipsterusername and JPPhoto and removed request for hipsterusername March 2, 2023 15:54
@lstein lstein enabled auto-merge March 6, 2023 04:23
@lstein lstein merged commit 68c2722 into v2.3 Mar 7, 2023
@lstein lstein deleted the bugfix/crash-on-unlink-after-convert branch March 7, 2023 05:09
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