Metachs / sdwebui-nai-api

zlib License
22 stars 3 forks source link

Toggle/Setting for the conversion of NAI prompts #8

Closed Jikko2022 closed 9 months ago

Jikko2022 commented 9 months ago

Hi would it be possible to enable/disable the conversion of the prompt syntax from NAI to local and vice versa via a setting? I found out that if I import an image the conversion is not working exactly how it should and i get a different result based on the same seed. Using the prompt from the metadata with the "{}" brackets works as intended but the conversion to a numerical value sadly breaks the seed.

Thank you for your time.

Metachs commented 9 months ago

Done, should have been there before but apparently I didn't commit that change. However the conversion should be identical, if you have a prompt that doesn't convert one to one, post it so I can look into what is going wrong. (The plain text of the prompt shouldn't matter, just weights, special characters and white space, so you can dummy anything out you don't feel like posting)

Metachs commented 9 months ago

I believe I found and resolved the issue (loose non-weight parenthesis were dropped when importing into NAI if the the prompt had A1111 weights). If you get a chance, check and see if the conversion is still breaking prompts, and let me know if it is still broken.

Jikko2022 commented 9 months ago

Hi, i just checked the newest update and it works as it should. Both importing it from the PNG Info and the settings are working as they should. Thank you!