invoke-ai / invoke-ai/launcher

[bug/query] windows gripes - launcher forgets install, memory leak during scan, error messages blocking cancel

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

Description

Today marks the 4th time in the last couple weeks that the launcher "forgot" the install. Downloading ~4GB every time I want to try this thing is getting tedious... especially as I've never gotten it past the part where it scans the local models.

When scanning a big pile of files, it eventually chows down all available 24GB/32GB RAM and then starts spilling over into the page file, basically making the computer useless for anything else. At first I figured I could restart the scan, it would skip what it had already scanned and just start scanning files it hadn't seen before... nope. It immediately starts hashing everything all over again then popping up error boxes after each "already in database" or similar.

Ok I thought, well... maybe if I disable the hashing? I was looking for a way to skip already scanned and came across this one. It goes a lot faster but the memory issue still crops up after a while, and if I'm not sitting here closing the "already in database" error boxes on a re-scan the memory problem still crops up... just faster. Presumably all those boxes are taking some memory each, too.

**That's 4 issues all rolled into one report, I guess... sorry:**
- Invoke launcher... forgets itself after a few days of non-use?
- some kind of memory leak on long list model scans
- no (apparent) way to 'skip' already scanned files to update with newly added ones
- resulting cascade of error messages that, on rescan, blocks access to the cancel button which:
- don't self-expire
- don't exist in their own bounds in the browser window
- don't have a 'clear all at once' method

## The Questions... For Anyone Who Feels Like Answering

### launcher
- How does the launcher determine if the install exists or is valid? What is it looking for and not finding?
- ie: _Does it rely on a temp file somewhere that might be getting wiped when I do a temp cleanup?_
- At least one of the times was my fault entirely, I cleaned up all the cached uv cpython packages on my OS drive
- Does the launcher _really_ have to be installed into my user dir on the OS drive? I mean I'm good with moving it and making a symlink or hardlink but there is no "normal" way to install it like a regular program?
- can Invoke run in a regular browser instead of relying on electron/launcher?

### eats memory
- Is it using a memory "heavy" library like python gguf to do the scanning thus hitting OOM because python can be weird about releasing memory?
- (imho) gguf should only be used one model at a time, it's pretty slow because of how it maps *everything* and for scanning is a very real bottleneck, at least on windows. I've not tested it on WSL or linux.
- Is there a way I missed completely to skip model rescan when they are already in the database?

I'll admit, I've pulled a large number of files to get a diverse sampling of the various files and formats. They are spread across 3 SSDs and symlinked to a single dir (ComfyUI's model dir) that I have been reusing for such scans. Most of them are assorted small to smallish files with a few practical use large ones.

Personally, I wound up going with my own "venv" for ComfyUI, basically just a batch script that alters the windows PATH to not include any system directories and essentially "sandboxes" pip/python/uv into a directory. Throw in the relevant CPython (or WinPython) version extracted from a zip distro as the "python_embedded", use the getpip.py file to put in pip, toss uv in the mix, then script install dependancies.txt from each path in comfy. I've been finding it more reliable that way, at any rate. Good_clean_fun() 😆

I was really looking forward to trying this to see how it compares to ComfyUI, I might have to cherry pick a few things instead of just pointing it at my amalgamated directory of symlinked files.

**If there is anything I can do to contribute and be a part of the solution (aside from trying to code my way out of a corner, I'm still learning python's quirks) let me know.**

In the meantime, I will keep looking into it to see if I can discover on my end why it's forgetting the install after a few days of inactivity.

---

**Side note:** it's kinda fun to throw a fast scanner (_ie: Everything with a filter `ext:safetensors;gguf;onnx;pt;pth size:>1MB`_) at a drive just to see what turns up:

```batch
C:\Windows\WinSxS\amd64_microsoft-windows-u..userpredictionmodel_31bf3856ad364e35_10.0.26100.7705_none_2879ba49c77f2820
- QUDowntimeUPMLV1.onnx
- QUDowntimeUPMLV2.onnx
```
Notably, Copilot AI for windows was disabled at install, those '.onnx' files are a few months old.

I did that scan after I found (purely by accident, I backed up the chrome profile and wondered why it was 4+GB too heavy) that google is pushing LLM (4GB .bin) and ML's into their Chrome installs too. At least the MS '.onnx' files are relatively small being under 100MB each.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Windows launcher losing its installation and the memory growth during large model scans. Trace the launcher install validation, scan handling for already-database files, and the error dialogs that block cancellation; no specific files or tests are named in the report. Done requires separating the reported behaviors and verifying installation persistence, bounded scan memory, duplicate-scan handling, and usable cancellation.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
databases, desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.