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

增加自动翻译和配方保存功能 #58

Closed
tang-bai opened this issue Oct 18, 2022 · 34 comments
Closed

增加自动翻译和配方保存功能 #58

tang-bai opened this issue Oct 18, 2022 · 34 comments
Labels
enhancement New feature or request

Comments

@tang-bai
Copy link

tang-bai commented Oct 18, 2022

可以参考https://github.com/CYDXDianXian/AI_image_gen插件增加自动翻译和配方保存功能
翻译功能可以降低一般人使用绘图功能的门槛,而且英语不好的人也不需要在频繁的打开翻译软件进行翻译
配方保存可以保存tag在之后可以进行展示回顾之类的
image
image
image
image

@shigma
Copy link
Member

shigma commented Oct 18, 2022

虽然不至于说不做,但是据我所知,自动翻译方案仍然存在精确性的问题,以至于使用中文词条的用户仍然需要准备一本中文单词表以确保自己的输入能够被模型识别。

不过配方是个很好的点子,感谢你的建议。会考虑加入相关功能。

@shigma shigma added the enhancement New feature or request label Oct 18, 2022
@NWYLZW
Copy link

NWYLZW commented Oct 18, 2022

好耶,禁咒可以出来了吗
火速加入 可爱的梦梦 禁咒


Generated by koishi-plugin-github.

@tang-bai
Copy link
Author

在我实际测试使用百度翻译按照中文指定人物形象准确度还是比较高的
PSTGHN9@$5ZOPEJ5Q0XX8HB

@shigma
Copy link
Member

shigma commented Oct 18, 2022

你 xp 不够怪.jpg


Generated by koishi-plugin-github.

@tang-bai
Copy link
Author

兄弟你的xp好怪啊.jpg

@shigma
Copy link
Member

shigma commented Oct 18, 2022

我试试吧,或许可以跟翻译插件联动一下。

@yulongyu
Copy link

yulongyu commented Nov 9, 2022

我试试吧,或许可以跟翻译插件联动一下。

之前的那个img2img问题,换了你今天的改版后解决了,请问中文支持是否还在做?

@MaikoTan
Copy link
Member

MaikoTan commented Nov 9, 2022

之前的那个img2img问题,换了你今天的改版后解决了,请问中文支持是否还在做?

Eh, je pense que la fonction de traduction des descriptions textuelles peut être implémentée dans un nouveau plugin.
Il y a des approches multiples pour parvenir. Mais je ne suis pas sûr de la préférer.

额,我觉得文本提示词的翻译功能应该在新的插件中实现。
有多种方式可以实现。但是我没有知道哪一个是更好。

@MaikoTan
Copy link
Member

MaikoTan commented Nov 10, 2022

Eh, je pense que la fonction de traduction des descriptions textuelles peut être implémentée dans un nouveau plugin. Il y a des approches multiples pour parvenir. Mais je ne suis pas sûr de la préférer.

额,我觉得文本提示词的翻译功能应该在新的插件中实现。 有多种方式可以实现。但是我没有知道哪一个是更好。

So there are multiple ways to execute or intercept the invoking of the novelai command to achieve this. The question is, how can we implement the translating feature?

Sure, you might want to drop those prompts into a machine translating engine, use its output to generate the actual image, and then call it a day.

Pros:

  • Easy, convenient, and performance

Cons:

  • it has no idea about some words: JK, 死库水, 白发, 贫乳, etc.
  • it might give words that behave worse on some models. for example, it uses tits to refer to human breasts, but breasts always behave better.
  • it sometimes misunderstanding the meaning, especially in long sentences.

So what about adding preprocessing before feeding the prompts to machine translating?

Pros:

  • Accurate, customizable
  • save aliases according to some useful snippets, also provide the recipe feature

Cons:

  • database is required to store aliases.
  • every user should edit their aliases before using the plugin.
  • sharing aliases is painful.
  • too noisy if we ship the plugin with aliases bundled.

Let's say these problems can be solved in the future, how about recipe saving?

Pros:

  • well, you name it.

Cons:

  • again, a database is required
  • many other parameters affect the image, should this information be stored in the database also?
    • NovelAI: models (note that NovelAI changed their models several times, so you can't even replicate old images with the same parameters), sampler, steps, seed, scale, prompt (including base prompt and negative prompt), resolution, etc.
    • SD-WebUI: everything above, but also VAE, seed variation, ENSD, hires fix, etc.
  • if demonstration images were also stored, the database would become larger and larger.

TL;NT: Too long, not translated

@MaikoTan
Copy link
Member

因此,有多种方法可以执行或拦截调用novelai命令来实现这一目的。问题是,我们如何实现翻译的功能?

当然,你可能想把这些提示放到一个机器翻译引擎中,用它的输出来生成实际的图像,然后就可以收工了

优点。

  • 简单、方便、性能好

缺点。

  • 它对某些词没有概念。JK, 死库水, 白发, 贫乳, 等等。
  • 例如,它用 "tits "来指代人类的乳房,但 "breasts "总是表现得更好。
  • 它有时会误解意思,特别是在长句子中。

那么,在向机器翻译输入提示信息之前增加预处理呢?

优点。

  • 准确,可定制
  • 根据一些有用的片段来保存别名,还提供 "食谱 "功能

缺点。

  • 需要数据库来存储别名。
  • 每个用户在使用该插件之前都应该编辑他们的别名。
  • 分享别名是很痛苦的。
  • 如果我们把插件和别名捆绑在一起,就太吵了。

让我们说说这些问题在未来可以得到解决,"配方保存 "怎么样?

优点。

  • 嗯,你的名字。

缺点。

  • 又需要一个数据库
  • 许多其他的参数会影响图像,这些信息是否也应该存储在数据库中?
    • NovelAI:模型(注意NovelAI多次改变他们的模型,所以你甚至不能用相同的参数复制旧的图像)、采样器、步骤、种子、比例、提示(包括基本提示和负提示)、分辨率等。
    • SD-WebUI:上述所有功能,但也包括VAE、种子变化、ENSD、雇工修复等。
  • 如果演示图像也被存储,数据库将变得越来越大。

通过www.DeepL.com/Translator(免费版)翻译

@tang-bai
Copy link
Author

tang-bai commented Nov 10, 2022

保存配方的目的并不是为了复制一张相同相似的一张图片,只是以相同的tag生成画风相似的图片,好比现在的魔法字典提供一些优质的tag生成自己喜欢的画风

翻译的功能只是方便一些不想打开翻译的人,想看一下参数简单的图,比如像是图片上的我一样只是想看一张白毛长发的萝莉,输入简单的文字就可以生成图片,他的目的并不是代替而是帮助

@MaikoTan
Copy link
Member

保存配方的目的并不是为了复制一张相同相似的一张图片,只是以相同的tag生成画风相似的图片,好比现在的魔法字典提供一些优质的tag生成自己喜欢的画风

I see. So the recipe is more like snippet (or aliases) that I said above, right?

(magic dictionary lol 🤣 )

翻译的功能只是方便一些不想打开翻译的人,想看一下参数简单的图,比如像是图片上的我一样只是想看一张白毛长发的萝莉,输入简单的文字就可以生成图片,他的目的并不是代替而是帮助

So basically these two features are actually one feature: the snippets.
Or may be snippets + machine-translating

But still, there are issues with the solutions.
In my opinion, these would be worth to be a new plugin that based on translating plugin and novelai plugin.

Maybe we can make a prototype in this github organization, but depends on @shigma .

@yulongyu
Copy link

我也强烈建议增加个中文翻译功能,如果想专业生成图片会选择用英语,但是在聊天群里大家更喜欢用中文娱乐。

@shigma
Copy link
Member

shigma commented Nov 10, 2022

中文翻译很快就会有,我已经在做了。

@tang-bai
Copy link
Author

到时候是直接使用翻译平台的api接口吗

@shigma
Copy link
Member

shigma commented Nov 10, 2022

到时候是直接使用翻译平台的api接口吗

是的。会先出有道翻译,其他的看需求加。

@tang-bai
Copy link
Author

我个人实际测试下来百度翻译的效果是比有道的好,而且百度每个月有十万的免费字符,实名之后每个月有百万字符的额度,有道翻译一些二次元的字词翻译出来很奇怪

@shigma
Copy link
Member

shigma commented Nov 10, 2022

了解了,那百度也会后续支持。

@MaikoTan
Copy link
Member

Bien, je vais écrire le plugin Baidu qui dépend de l'interface de traduction de @shigma.

好,我会写百度的插件,依附于 @shigma 的翻译接口。

@yulongyu
Copy link

大佬更新了通知下哈 介入翻译难不难

@shigma
Copy link
Member

shigma commented Nov 13, 2022

@yulongyu @tang-guo-guo

最新版本 1.14.1 现已加入了实验性的翻译支持!安装 koishi-plugin-translator-baidu 后即可自动翻译用户输入,欢迎前来尝试~

@yulongyu
Copy link

插件市场里没找到这个插件,需要更新什么么?

@yulongyu
Copy link

可以了,看到了百度和有道,我都测试下

@yulongyu
Copy link

测试百度可用

@MaikoTan
Copy link
Member

插件市场里没找到这个插件,需要更新什么么?

Oui, je n'ai pas non plus trouvé ce plugin sur le marché, nous allons enquêter plus tard. Pardon !

是的,我没有找到这个插件在市场里。我们将会在之后调查。抱歉!

@MaikoTan
Copy link
Member

测试百度可用

Congratulations !

@kuyin
Copy link

kuyin commented Nov 14, 2022

测试有道翻译有bug,开启标签翻译之后输入中文可以使用,但是输入英文会出现所有tag都不被输入的情况,是自动被双向翻译了吗?

@MaikoTan
Copy link
Member

测试有道翻译有bug,开启标签翻译之后输入中文可以使用,但是输入英文会出现所有tag都不被输入的情况,是自动被双向翻译了吗?

Can you describe what the problem you have now?
You could set the output in configuration to be 'verbose' to compare your input and the actual prompt consummed by (whatever backend you chose), and then shows what is expected and what is not?

@kuyin
Copy link

kuyin commented Nov 20, 2022

测试有道翻译有bug,开启标签翻译之后输入中文可以使用,但是输入英文会出现所有tag都不被输入的情况,是自动被双向翻译了吗?

Can you describe what the problem you have now? You could set the output in configuration to be 'verbose' to compare your input and the actual prompt consummed by (whatever backend you chose), and then shows what is expected and what is not?

When translator-youdao is on, and in novelai settings: tanslator on and LatinOnly off, any English input will be ignored.
image

@MaikoTan
Copy link
Member

When translator-youdao is on, and in novelai settings: tanslator on and LatinOnly off, any English input will be ignored. image

Oui, j'ai vu que le traducteur de Youdao a de mauvaises performances pour la traduction anglais-anglais. Vous pourriez désactiver le traducteur temporairement.
J'ajouterais une nouvelle option pour désactiver la traduction dans l'invocation d'une commande.

是的,我看到有道译者在英译英方面表现不佳。 您可以暂时禁用翻译器。
我添加一个新选项来禁用命令调用中的翻译。

@MaikoTan
Copy link
Member

MaikoTan commented Jan 29, 2023

Although this issue was inactive for two months and more, but still you need the recipe feature now? Also I think this feature should be highly database-dependent.
Maybe you could open a new issue or discussion and talk about the detail of it, and I am going to close this one, as this one is extremely long now.

虽然这个议题已经不活动了两个月还多,但你现在依旧需要配方这个功能吗?而且我认为这个功能应该是高度数据库依赖的。
也许你可以开启一个新的议题或讨论然后讨论它的细节,然后我会关闭它,因为这个现在已经太长了。

@tang-bai
Copy link
Author

如果增加配方这个功能过于麻烦就可以不需要了,一般有自动翻译自己在群里面玩一下就可以了,这个issues我就关闭了,感谢

@shigma
Copy link
Member

shigma commented Jan 31, 2023

如果增加配方这个功能过于麻烦就可以不需要了

主要问题不是麻烦,而是 Koishi 团队同时维护太多插件,产能吃紧 😭

如果有需要都可以开 issue,万一有缘人看到了大概没准可能说不定就做了呢(

@MaikoTan
Copy link
Member

MaikoTan commented Feb 1, 2023

Yep, currently we Koishi team have many works to do. And the recipe feature was still not talked about in this issue.
So, I was meaning that if you still need this feature, you could go ahead and produce a new one, we could talk about the detail of it in that one.

是的,目前我们恋恋团队有太多的工作。而配方功能在这个议题还没有被讨论。
因此,我的意思是如果你仍旧需要这个功能,你可以走和生产一个新的,我们可以讨论它的细节在那个。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants