LostRuins / koboldcpp

A simple one-file way to run various GGML and GGUF models with a KoboldAI UI
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
4.41k stars 319 forks source link

Set launcher file dialog initial paths from existing file values if they exist #740

Closed one-lithe-rune closed 4 months ago

one-lithe-rune commented 4 months ago

Motivation

I was having trouble finding which of my .safetensors checkpoints for Stable Diffusion would actually work rather than fail to load. Since I was having to reload and try a different file a lot, I found it inconvenient to always navigate to the path where I keep those checkpoint files whenever I reloaded. Especially when my .kcpps was already pointing at a file in the correct directory, albeit at a file that didn't work.

This changes it so the 'Browse' buttons for files in the launcher will use the path from the current value (if there is one) to start the file dialog in. This also smooths out swapping LLM models when you already have a .kcpps file to tweak.

Changes

Possible Problems/Concerns

LostRuins commented 4 months ago

Hmm but doesn't this make it annoying to select any file that's not in your usual path? I can see it working both ways. I think it might be okay, but I just wanna raise this point in case anyone has strong objections before I merge this. Otherwise I am fine with it.

@henk717

henk717 commented 4 months ago

Most software works this way, I don't see any issues with the idea.