invoke-ai / invoke-ai/launcher

feat: add cache clearing to repair mode, improve uv cache handling

Open
#54 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
48
Forks
23
Avg merge
1m
Merged PRs (30d)
1

Description

Like `pip`, `uv` caches package downloads to support quick installation.

Currently, the launcher uses the system `uv` cache. Occasionally, a package gets borked - presumably during or after the wheel is extracted, because the actual downloads from PyPI (i.e. the wheels) are hashed and checked.

When this happens, we need to evict the offending packages from the `uv` cache. The [launcher docs](https://github.com/invoke-ai/launcher?tab=readme-ov-file#problems-while-installing-invoke-via-launcher) and [Invoke quick-start docs](https://invoke-ai.github.io/InvokeAI/installation/quick_start/#troubleshooting) both describe how to clear the `uv` cache by running a command in the dev console.

It would be nice if repair mode did this for the user. Unfortunately, the command cleans the _whole_ `uv` cache. This is rather rude to those who use `uv` for things other than Invoke - it wipes out their cache and forces all packages to be re-downloaded.

Well, what if we had `uv` use a separate cache for Invoke? It's possible, but those who use `uv` for other things could have a lot of duplicated cached packages. So that's also kinda rude.

If we did make the switch to using a separate cache, we'd be doubling disk usage for existing users. Their `uv` system cache would still be full from their last Invoke install, but then we are we are making and downloading everything to a new cache!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining repair mode and the existing command used from the dev console to clear the uv cache. Define a cache-clearing approach that avoids unnecessarily deleting unrelated uv data, then verify that repair mode handles the reported broken-package case without forcing unrelated packages to be re-downloaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.