Frontend Manager: avoid redundant gh calls for static versions #5152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reduces the risk of errors like this:

By avoiding makings call to github API if the frontend is already downloaded locally for a specific version anyway. Only not-yet-installed versions or
latest
still makes github API calls this way.The check is a very simple - if you're not default, and have a version starting with "v", you want a specific frontend version, so we can just check that specific folder exists, and use it if so.
Prior to this PR, this type of error could potentially happen at any time when launching comfy, from either GitHub API limits like the user above saw, or from network connectivity issues, or etc.
The API limit error risk was increased by the fact that the existing code reads a list of all versions by making multiple API calls in sequence, ie it may eat more API calls that needed. There's potential for further improvement here by way of removing that full-list-read and replacing it with a direct single version check.
Note that a fresh install with an undownloaded specific version still needs to connect to github to load that version, so that users actual case is not necessarily cured other than by waiting for the api limit to drop.
Also reports a notice in logs when github calls are happening (feels weird that that was happening silently before now)
Also moves the download to a folder with a
.tmp
suffix until everything's extracted as otherwise you can CTRL+C the comfy window while it's downloading and get stuck in a state where comfyui thinks its has the frontend downloaded but it doesn't actually.