nixified-ai / flake

A Nix flake for many AI projects
GNU Affero General Public License v3.0
624 stars 69 forks source link

Cannot create characters in textgen. #60

Open crabdancing opened 8 months ago

crabdancing commented 8 months ago

When running textgen-nvidia as of 7b9730e0a75bcd6375b0780aef75e406ea20a9a4, and attempting to add a new character via Parameters -> Character:

FileNotFoundError: [Errno 2] No such file or directory: '/nix/store/ypar8406iyb6r22n755ygvfbplwjs050-textgen-patchedSrc/nix/store/ypar8406iyb6r22n755ygvfbplwjs050-textgen-patchedSrc/characters/TestCharacter.yaml'

Where TestCharacter is the name of the character created through the UI wizard.

Needless to say, it probably is not supposed to be trying to write to the nix store, so, bug? :P

MatthewCroughan commented 8 months ago

Textgen upstream can only run inside of the same directory as the source code. To fix that, I made a bunch of symlinks which trick it into redirecting those state folders to ~/.textgen, though I haven't completely fixed it, as you've figured out. When it says it's writing to the Nix Store, this is fine, because the directory in the Nix Store that it's writing to is actually a symlink to ~/.textgen

crabdancing commented 8 months ago

Ah, that explains some of the weird symlink-ridden shell scripts I saw on my last skim through. But how are you dealing with the fact that ~/.textgen expands to multiple paths depending on which user is running it?