已无需手动安装,在config.py 文件中,添加 阿里云/百度翻译 API的密钥+ key
| English | 中文教程 | 视频教程 | 更新内容 |
introduction:
1. I created two translation nodes, which can be both installed or only one of them can be used;
2. first one is `BaiduTranslateApi`, it's used BaiduTranslate developer account
on the official website of Baidu Translator, which can be used for a long time by oneself;
3. second is `BaiduTranslate`, Connected to the Api of Baidu Translate, Need install requirements;
4. unable to preview the prompt words in Comfyui, i dont know how to do it. If you have any good ideas, Let me know!
5. I didn't use Google Translate because I need to use it in China.
- Download Baidutranslate zip,Place in
custom_nodes
folder, Unzip it; - Go to ‘Baidu Translate Api’ and register a developer account,get your
appid
andsecretKey
; - Open the file
config.py
in Notepad/other editors; - Fill your
apiid
in quotation marks ofappid = ""
; - Fill your
secretKey
in quotation marks ofsecretKey = ""
; - Save file.
- go config.py;
- fill apiid and key.
- Preview translate result。
- Nodes in Prompt translate list,if you use own Api, use
翻译Api auto to English
; - you can install both, whatever use.
简介:
1. 有两个版本,一个是`BaiduTranslateApi`,这个需要去百度翻译官网注册开发者账号,可以自己长久使用。
2. 第二个版本是`BaiduTranslate`,我爬了百度翻译的接口,不被百度反爬也可以长期使用。
3. 暂时没法在comyfui中预览到提示词和修改,涉及到知识盲区,若大家有好的想法可以提出来!
- 下载 Baidutranslate 压缩包,放到
custom_nodes
文件夹中; - 先去百度翻译,在上面点开 ‘翻译API’ 注册一个开发者账号,获得你的
appid
和secretKey
; - 记事本/其他编辑器打开文件
config.py
; appid = ""
引号之中填写你的百度翻译apiid
;secretKey = ""
引号之中填写你的百度翻译secretKey
;- 保存文件.
- 和百度云一样。
- 预览翻译的结果;
- 感谢B站网友给的建议,以及B站用户【阿米吉】提供的代码与思路。
- 更新了文本预览节点
- 更新 可以在翻译节点内,选择翻译成语言,这样可以用作反推提示词。
- 更新了文本预览的实现方式,看看还有没有 冻结的问题。
- 大佬shiertier更新支持阿里云,并做优化。