Skip to content

Conversation

keturn
Copy link
Contributor

@keturn keturn commented Jul 11, 2025

A partial fix for Invoke exhausting disk space, this PR to the DownloadQueueService causes it to refuse to download if the advertised file size is bigger than the available space.

I tried to put this at a higher level, in ModelInstallService._install_remote_model, but despite its attempt to calculate the total_bytes of the install job at that time, in practice it doesn't have that information.

I say partial fix because the model installer copies the files from the temporary directory to the model directory, causing you to temporarily need twice as much disk space—that can be a separate issue.

It is also short-sighted in that if given an install job involving multiple files, it may spend the time to fully download earlier files before realizing it cannot complete all of them.

QA Instructions

  • install a model from URL or HF
  • if you want to be thorough, try to install a model that's bigger than your remaining free disk space. Or you can temporarily hack the code's free_space calculation to simulate that condition.

Merge Plan

N/A

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added python PRs that change python files services PRs that change app services labels Jul 11, 2025
@keturn keturn force-pushed the feat/check_download_space branch from 5347bd6 to ccc75fc Compare July 11, 2025 20:37
Copy link
Collaborator

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

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

Thanks!

@psychedelicious psychedelicious merged commit bb3e5d1 into invoke-ai:main Jul 12, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python PRs that change python files services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants