asagi4 / comfyui-prompt-control

ComfyUI nodes for prompt editing and LoRA control

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support folder when loading lora?

dchatel opened this issue · comments

In parser.py, line 29 we can see this:

FILENAME: /[^<>:\/\\]+/

Which actually prevents the use of folders for arranging loras.
Maybe change it to FILENAME: /[^<>:]+/ ?
Is there any reason for filtering slashes and backslashes?

The node will find LoRAs in subdirs by just using the filename (without its extension), though if you have two LoRAs with the same name it'll pick the first one it finds.

I might relax the requirement and allow specifying directories, but I haven't had a need for that myself so I haven't implemented it.

pythongosssss custom scripts lora auto complete adds the directory. I know it's possible to remove the foldername and simply use the file stem, but supporting the folder structure seem to be a pretty easy change.