Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Ensure LoRA files are only linked to the LoRA directory #78

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rokurolize
Copy link

The LoRA files were also linked to the directory where the model files are located, so I added a condition to the check process. In addition, I thought I would lowercase it to match the other directories.

@Cyberes
Copy link
Collaborator

Cyberes commented Mar 2, 2023

The official documentation says that Lora models should go in models/Lora https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#extra-networks

Did they change something?

@Rokurolize
Copy link
Author

Rokurolize commented Mar 2, 2023

Since the only lower-case letters are for directories under model_storage_dir, the directory structure of the WebUI remains the same.
I saw that the VAE directory in the WebUI was uppercase and the VAE directory under model_storage_dir was lowercase, so it was a lighthearted idea to make lora lowercase as well.
However, I realized that some users might have already created a Lora directory and stored it under /storage, so it could cause confusion. Therefore, I will remove the lower case changes later.

EDIT: Done.

@Rokurolize Rokurolize changed the title Ensure LoRA files are only linked to LoRA directories and unify directory names to lower case Ensure LoRA files are only linked to the LoRA directory Mar 2, 2023
@Rokurolize
Copy link
Author

Since Lora models can also be placed and used in subdirectories of the Lora directory, I noticed that Lora models placed in such a deep hierarchy are not excluded and are still linked to both the Lora directory and the SD model directory. So this fix is not sufficient. I will fix it later.

@Rokurolize Rokurolize changed the title Ensure LoRA files are only linked to the LoRA directory [WIP] Ensure LoRA files are only linked to the LoRA directory Mar 4, 2023
@pbuyle
Copy link

pbuyle commented May 12, 2023

Lora are later properly linked from Path(model_storage_dir, 'Lora') to webui_lora_model_path. But the link_ckpts which run first also links them to webui_sd_model_path. As result, they appears in the checkpoints selection dropdown. This PR fix es the link_ckpts function so LoRAs are ignored when linking checkpoints (like vaes and hypernetworks are).

@xxBLUECATxx
Copy link

Lora are later properly linked from Path(model_storage_dir, 'Lora') to webui_lora_model_path. But the link_ckpts which run first also links them to webui_sd_model_path. As result, they appears in the checkpoints selection dropdown. This PR fix es the link_ckpts function so LoRAs are ignored when linking checkpoints (like vaes and hypernetworks are).

But no matter what, it will not affect the use of Lora right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants