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]: Random texts are translated into Chinese, despite config settings #814

Open
Grachy opened this issue Jan 4, 2025 · 4 comments
Open
Labels
bug Something isn't working

Comments

@Grachy
Copy link

Grachy commented Jan 4, 2025

Issue

It mostly happens when translating from Japanese (but sometimes with english texts too), but I also encountered it when translating from other languages (such as english or korean), where there were japanese characters. Even though target language has been defined it weirdly translates into chinese.

I even put skip-lang for japanese sometimes and it even ignores that.

image

Command Line Arguments

No response

Console logs

No response

@Grachy Grachy added the bug Something isn't working label Jan 4, 2025
@popcion
Copy link
Contributor

popcion commented Jan 6, 2025

If the AI returns a Chinese translation, it may be because your prompt led it to return a Chinese translation. Check your prompt. Additionally, you can change the Chinese translation examples in _CHAT_SAMPLE to Russian, which might provide better guidance for some less advanced models.

@Grachy
Copy link
Author

Grachy commented Jan 6, 2025

If the AI returns a Chinese translation, it may be because your prompt led it to return a Chinese translation. Check your prompt. Additionally, you can change the Chinese translation examples in _CHAT_SAMPLE to Russian, which might provide better guidance for some less advanced models.

I encountered it only with GPT, so I assume it has something to do with its default settings.

@Grachy
Copy link
Author

Grachy commented Jan 7, 2025

Here is my prompt, but I don't see any issue in it... Especially one that will cause it to translate to chinese.

docker run --env-file=.env -v /home/translate/images:/app/images -v /home/translate/images-translated:/app/images-translated -v /home/translate/fonts:/app/fonts -v /home/translate/models/:/app/models --ipc=host --rm private:main --mode=batch --input=/app/images --target-lang=RUS --font-path=fonts/anime_ace.ttf --ocr=48px --manga2eng --inpainter=lama_mpe --translator=gpt3.5 --gpt-config=fonts/gpt-config.yml

@popcion
Copy link
Contributor

popcion commented Jan 8, 2025

I mean, check _CHAT_SYSTEM_TEMPLATE and _PROMPT_TEMPLATE in chatgpt.py file.
or something wrong in your gpt-config.yml file.

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