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

Bug: Translator Causes Negative Prompt Became Positive Prompt #121

Open
MaikoTan opened this issue Nov 19, 2022 · 2 comments
Open

Bug: Translator Causes Negative Prompt Became Positive Prompt #121

MaikoTan opened this issue Nov 19, 2022 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MaikoTan
Copy link
Member

Describe the bug

According to "les amies de groupe", only the Baidu translator does such a fun fact, the Youdao translator perhaps well instead.

So when we want to add the negative prompt, we can use -u, --undesired, and negative prompt: to achieve this.
But when you enable the translate feature, the translator would translate -u into - u, or even ate the -u part, so then the negative prompt part would become ridiculously the prompt itself!

Steps to reproduce

  1. Starts Koishi with NovelAI-Bot plugin
  2. nai une fille petite -u lowres, jpeg artifact, mauvais hand
  3. the actual prompt became little girl, big breasts, bad hair, bad eyes, bad hands (the -u was eaten)

Expected behavior

Being able to use -u and --undesired properly.

Screenshots

No response

Relevant log output

No response

Launcher

Koishi CLI (koishi start)

Backend

Stable Diffusion WebUI (AUTOMATIC1111)

Versions

  • OS: Ubuntu 22.04
  • Adapter: Discord
  • Node version: 16.4.0
  • Koishi version: Any

Additional context

No response

@MaikoTan MaikoTan added the bug Something isn't working label Nov 19, 2022
@MaikoTan MaikoTan self-assigned this Nov 19, 2022
@MaikoTan
Copy link
Member Author

A better workaround is to split positive and negative prompt before feeding them to the baka translator.
I am trying to fix this but I don't know how to achieve it. Also there would be 2 http requests if we split them out first.

@MaikoTan MaikoTan added the help wanted Extra attention is needed label Nov 20, 2022
@MaikoTan
Copy link
Member Author

Don't know if Baidu or Youdao has a rate limit on translate API, but it looks like sending two requests concurrently (with Promise.all()) is still useful here.
So it looks like a prompt parser is still needed here. Does anyone have thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant