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

Missing Lora Finder #571

Open
Cyph3r opened this issue Feb 6, 2025 · 0 comments
Open

Missing Lora Finder #571

Cyph3r opened this issue Feb 6, 2025 · 0 comments
Labels
Feature New feature or request

Comments

@Cyph3r
Copy link

Cyph3r commented Feb 6, 2025

Feature Idea

As an avid user with many LoRAs, and a desire to keep them organized - especially with your new "Rename Model" feature - I often find that I wish to "reuse parameters" from a previous generation, make changes, and generate. Often it occurs that I've renamed or reorganized several Loras into new folders and I get the dreaded:
Image
When using 8+ Loras, this can become cumbersome.

Suggestion:

  1. On Generate click, if error would be produced, first do a scan for each invalid Lora, based on Lora ID or hash. (it looks like you're already doing a loop through the loras, and identifying each that is missing/invalid, and that's where you'd look for it's new location.)
  2. For each invalid/missing Lora found, update the "Current LoRAs" Lora to show and use the correct path/name.
  3. If all is well, generate as normal, else pass to the same error that already presents itself in this condition (image above).

Psuedocode:

def onGenerate(...):
    ...
    for lora in loras_selected:
        if settings.is_enabled(lora_finder):
            new_lora_location = find_missing_lora(lora)
            
            if new_lora_location:
                update_lora_info(lora, new_lora_location)
            else:
                # Append error message if no new location is found
                error_message += f"{lora.FullPath}"
    ...

Other

Add a toggle for this feature in settings.

Optionally: Update the found Loras in the old image metadata.

@Cyph3r Cyph3r added the Feature New feature or request label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant