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

Autocomplete LoRA filename with parenthesis #1213

Closed
Danamir opened this issue Sep 24, 2024 · 1 comment
Closed

Autocomplete LoRA filename with parenthesis #1213

Danamir opened this issue Sep 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Danamir
Copy link
Contributor

Danamir commented Sep 24, 2024

When auto-completing a LoRA name including parenthesis in the prompt, those are escaped and thus the file cannot be found.

A quick fix could be to add in autocomplete.PromptAutoComplete the property :

    @property
    def is_lora_mode(self):
        prefix = self._current_text()
        name = prefix.removeprefix("<lora:")
        return len(prefix) > len(name)

An alter first line of the _insert_completion() method :

    if not self.is_lora_mode:
        completion = completion.replace("(", "\\(").replace(")", "\\)")
@Acly Acly added the bug Something isn't working label Oct 13, 2024
@Acly
Copy link
Owner

Acly commented Oct 18, 2024

Fixed in 1.26.0

@Acly Acly closed this as completed Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants