InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: LoRA filenames don't like periods?

Open Fortyseven opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

24gb

What version did you experience this issue on?

2.3.5.post1

What happened?

I have two LoRAs:

  • bob_dobbs-n47-v1.safetensors and
  • bob_dobbs.n47-v1.safetensors

Same binary. The only difference being the use of a period in the filename.

withLora(bob_dobbs-n47-v1,0.75) works (no period), withLora(bob_dobbs.n47-v1,0.75) does not.

Contact Details

[email protected]

Fortyseven avatar May 24 '23 05:05 Fortyseven

According to LORA feature documentation, InvokeAI can only recognise LORA files whose filenames contain alphanumeric symbols and underscore.

Although this issue seems easy to fix, it will require some modifications to the prompt parser (see: ldm/invoke/conditioning.py) used by InvokeAI.

EDIT: Apparently minus/hyphen symbol (-) can also be parsed. I just noticed on some of LORAs that I have.

addianto avatar Jun 09 '23 17:06 addianto

Although this issue seems easy to fix, it will require some modifications to the prompt parser (see: ldm/invoke/conditioning.py) used by InvokeAI.

@addianto I'd be very interested in a fix to support any OS filenames for LoRA files. Any chance someone would give it a shot?

Neosettler avatar Jul 02 '23 16:07 Neosettler

For context, it's probably not a big deal for those who have a handful of LoRA files but for managing a library with hundreds or thousands plus, it's a whole different story. Please, consider the "easy fix".

Neosettler avatar Jul 02 '23 16:07 Neosettler

LoRA use will no longer be managed with the prompt parsing. We’ll need to test to see if new implementation has similar issue, but is unrelated to this

hipsterusername avatar Jul 02 '23 16:07 hipsterusername