ComfyUI > Nodes > ComfyUI-TranslateGemma > TranslateGemma

ComfyUI Node: TranslateGemma

Class Name

TranslateGemma

Category
text/translation
Author
rookiestar28 (Account age: 863days)
Extension
ComfyUI-TranslateGemma
Latest Updated
2026-02-26
Github Stars
0.03K

How to Install ComfyUI-TranslateGemma

Install this extension via the ComfyUI Manager by searching for ComfyUI-TranslateGemma
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-TranslateGemma in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

TranslateGemma Description

TranslateGemma extracts and translates text from images using a multimodal chat template, optimizing VRAM usage.

TranslateGemma:

TranslateGemma is a sophisticated node designed to facilitate the translation of text found within images using a multimodal chat template. It leverages advanced preprocessing techniques and a robust vision encoder to accurately extract and translate text from images. The node supports a two-pass translation mode, which first extracts the text in the source language and then translates it into the target language. This ensures high accuracy and contextual relevance in translations. Additionally, TranslateGemma offers support for quantization, which helps reduce VRAM usage, making it efficient for use in resource-constrained environments. The node is particularly beneficial for AI artists and designers who need to work with multilingual content embedded in visual media, providing them with a seamless and efficient translation tool.

TranslateGemma Input Parameters:

input_text

This parameter represents the text input that needs to be translated. It is crucial for the node's operation as it serves as the primary content for translation. The input text should be clear and concise to ensure accurate translation results.

target_language

The target language parameter specifies the language into which the input text should be translated. It is essential for guiding the translation process and ensuring that the output is in the desired language. Users should select the appropriate language code for accurate translations.

source_language

This parameter indicates the language of the input text. While the node supports auto-detection of the source language, specifying it explicitly can enhance translation accuracy, especially for languages with similar scripts. Users should choose the correct source language to avoid translation errors.

model_size

Model size determines the complexity and capacity of the translation model used. Larger models may provide more accurate translations but require more computational resources. Users should balance model size with available resources for optimal performance.

prompt_mode

Prompt mode influences how the translation model interprets and processes the input text. It can affect the style and tone of the translation, making it an important parameter for achieving the desired output.

max_new_tokens

This parameter sets the maximum number of new tokens that can be generated during translation. It helps control the length of the translated text, ensuring it remains concise and relevant to the input.

max_input_tokens

Max input tokens define the maximum number of tokens the model can process from the input text. This parameter is crucial for managing input size and preventing truncation of important content.

truncate_input

Truncate input determines whether the input text should be truncated if it exceeds the maximum token limit. Enabling this option can prevent errors but may result in loss of important information.

strict_context_limit

This parameter enforces strict adherence to context limits, ensuring that the translation remains within the specified boundaries. It is useful for maintaining focus and relevance in translations.

keep_model_loaded

Keep model loaded specifies whether the translation model should remain loaded in memory after use. Keeping the model loaded can improve performance for repeated translations but may increase memory usage.

debug

The debug parameter enables detailed logging of the translation process, providing insights into the node's operation. It is useful for troubleshooting and optimizing translation settings.

quantization

Quantization reduces the precision of the model's weights, decreasing VRAM usage while maintaining performance. This parameter is beneficial for users with limited computational resources.

TranslateGemma Output Parameters:

results

The results parameter contains the translated text output from the node. It reflects the successful translation of the input text into the target language, providing users with the desired multilingual content.

TranslateGemma Usage Tips:

  • Ensure that the source language is correctly specified to avoid translation errors, especially for languages with similar scripts.
  • Utilize the debug mode to gain insights into the translation process and optimize settings for better performance.
  • Consider using quantization if you are working with limited VRAM resources to maintain efficiency without compromising translation quality.

TranslateGemma Common Errors and Solutions:

[Error: Image translation requires an explicit source_language. Auto Detect is not supported by the official TranslateGemma chat template.]

  • Explanation: This error occurs when the source language is set to "Auto Detect" for image translation, which is not supported by the node.
  • Solution: Specify the source language explicitly to proceed with the translation process.

Translation failed: <error_message>

  • Explanation: This error indicates that the translation process encountered an issue, possibly due to incorrect input parameters or model loading errors.
  • Solution: Check the input parameters for accuracy and ensure that the model is correctly loaded. Use the debug mode to gather more information about the error context.

TranslateGemma Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-TranslateGemma
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

TranslateGemma