-
Notifications
You must be signed in to change notification settings - Fork 272
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
Magic Prompt adding unknown prompts and symbols when using Loras #707
Comments
Thanks for the report! I suppose the Magic Prompt models (which aren't part of the extension, to be clear) haven't been trained on prompts that contain LoRAs, so they get confused and output nonsense. We could strip out LoRA syntax before feeding the prompt to the Magic Prompt and then put it back in afterwards, but at present, that isn't happening. |
Thank you for the reply. It hadn't occurred to me that the prompt model relies on the existing prompt but of course this makes sense. Your proposed solution sounds like a good idea. I would offer to help but wouldn't know how! |
Thank you for the quick solution! |
@perspeculum No problem. I merged #708 now, so if you update the extension, this should work better :) |
I'm getting Python errors on generation with the new merge, and no magic prompts being added. This is the traceback:
|
Oops... I'll check that out. |
@perspeculum Okay, fixed. Silly |
@akx That appears to be working well now, thank you! There's a minor formatting issue in terms of the double ,, at the beginning and lack of , before the tag, but I don't suppose this is affecting the functionality. |
The double commas and lacks of spaces shouldn't matter :) (We actually already do try to clean up various cruft from the machine-generated prompts, but evidently not double commas!) I'll go ahead and close this as fixed. |
Hello,
Magic Prompt appears to be having some issues when enabled if Loras are present in the main prompt.
With some images, not all, it adds random characters (e.g. < and [ ] ) to the prompt. Additionally, the word 'unknown' frequently appears in the final prompt. Example below. The problem seems to disappear when the Loras are removed from the main prompt.
I'm using SDXL and have tried two different base models and a number of different Loras.
The problem seems to be exacerbated by very short prompts. Providing a longer original prompt was used, increasing the 'Max magic prompt length' did not seem to worsen it. Additionally, using the same short prompts without any Loras did not replicate the issue.
Running latest versions of web-ui and the dynamic-prompts. I'm using the Gustavosta/MagicPrompt-Stable-Diffusion prompt model.
Examples (main prompt is up to and including the lora):
The text was updated successfully, but these errors were encountered: