Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates language translation using Baidu service for AI artists, automating and securing the process.
The PromptTranslator
node is designed to facilitate seamless language translation using the Baidu translation service. It is particularly useful for AI artists who need to translate text prompts between different languages, such as English and Chinese, to enhance their creative projects. This node leverages Baidu's robust translation API, ensuring accurate and efficient translations. By automating the translation process, it saves time and effort, allowing you to focus more on the creative aspects of your work. The node manages API credentials securely and handles access tokens to ensure smooth operation without frequent manual intervention. Its primary goal is to provide a reliable and user-friendly translation tool that integrates seamlessly into your workflow.
The apiKey
is a string parameter that represents your unique API key for accessing the Baidu translation service. It is essential for authenticating your requests to the API. The default value is an empty string, and you must provide a valid API key to use the translation service effectively.
The secretKey
is another string parameter that works in conjunction with the apiKey
to authenticate your access to the Baidu translation service. Like the apiKey
, it is crucial for ensuring secure communication with the API. The default value is an empty string, and you need to input a valid secret key for successful operation.
The fromLang
parameter specifies the source language of the text you wish to translate. It offers options such as auto
, en
(English), and zh
(Chinese). The auto
option allows the service to automatically detect the source language, which can be particularly useful when dealing with multilingual content.
The toLang
parameter defines the target language for the translation. You can choose between en
(English) and zh
(Chinese), depending on your translation needs. This parameter is crucial for directing the translation process to the desired output language.
The text
parameter is a multiline string input where you provide the text that needs to be translated. It supports large blocks of text, making it suitable for translating extensive prompts or descriptions. The default value is an empty string, and you should input the text you want to translate here.
The 翻译结果
(Translation Result) is a string output that contains the translated text. This output is the primary result of the translation process, providing you with the text in the target language specified by the toLang
parameter. It is essential for verifying the accuracy and relevance of the translation to your original input.
apiKey
and secretKey
are correctly configured and valid to avoid authentication errors and ensure smooth operation of the translation service.auto
option for fromLang
if you are unsure of the source language, as it allows the service to automatically detect and translate the text accurately.<error_message>
apiKey
and secretKey
are correct and active. Check your network connection and ensure that the Baidu translation service is accessible. If the problem persists, review the error message for specific details and consult Baidu's API documentation for further troubleshooting steps.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.