InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: LoRAs with spaces in the name can't be used

Open xaroth8088 opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

24GB

What version did you experience this issue on?

2.3.5.post2

What happened?

Steps to reproduce

  1. Download any LoRA and name it example with spaces.safetensors
  2. Copy that file and name the copy example_without_spaces.safetensors
  3. Put both files in the invokeai/loras directory
  4. Start InvokeAI's web interface
  5. Set the seed to any fixed value you like
  6. Type cat for your prompt
  7. Click "Add Lora", and select example_without_spaces a. Your prompt should now read cat withLora(example_without_spaces,0.75)
  8. Click Invoke
  9. Click "Add Lora", deselect example_without_spaces and select example with spaces a. Your prompt should now read cat withLora(example with spaces,0.75)
  10. Click Invoke

Expected Results

Because the prompt, seed, and backing LoRA file was the same for both images, both images should be identical.

Actual Results

The images are different. Specifically, the image you generated using the example with spaces LoRA doesn't utilize the LoRA at all.

Screenshots

No response

Additional context

No response

Contact Details

No response

xaroth8088 avatar May 25 '23 06:05 xaroth8088

oh, that was my problem until I eventually wrote a script to automatically download and rename LoRA

I have almost 3000 of them already, I can't even open the drop-down list because my browser freezes on this

I can offer my repository as a temporary solution (I hope that similar functionality will eventually appear in Invoke)

VeyDlin avatar Jun 04 '23 14:06 VeyDlin

This is related to #3452. InvokeAI does not support LORA filenames that contain symbols other than alphanumeric symbols and underscore. So, the solution will be renaming the LORA files.

addianto avatar Jun 09 '23 17:06 addianto