MCPcopy Create free account
hub / github.com/Lightricks/ComfyUI-LTXVideo / GemmaAPITextEncode

Class GemmaAPITextEncode

gemma_api_conditioning.py:43–147  ·  view source on GitHub ↗

Encodes text prompts using the LTX Video API, returning CONDITIONING for LTX-2 models. This node replaces the local CLIP encoding step by sending the prompt to an external API for processing. It requires an API key and automatically extracts the model ID from the checkpoint file me

Source from the content-addressed store, hash-verified

41
42@comfy_node(name="GemmaAPITextEncode")
43class GemmaAPITextEncode:
44 """
45 Encodes text prompts using the LTX Video API, returning CONDITIONING for LTX-2 models.
46
47 This node replaces the local CLIP encoding step by sending the prompt to an external API
48 for processing. It requires an API key and automatically extracts the model ID from the
49 checkpoint file metadata.
50
51 Inputs:
52 - api_key: Authentication key for the LTX Video API
53 - prompt: Text prompt to encode
54 - ckpt_name: Checkpoint file containing model metadata
55
56 Returns:
57 - CONDITIONING: Encoded prompt conditioning ready for LTX-2 video generation
58 """
59
60 @classmethod
61 def INPUT_TYPES(cls):
62 return {
63 "required": {
64 "api_key": (
65 "STRING",
66 {
67 "default": "",
68 "placeholder": "API_KEY",
69 "multiline": False,
70 "tooltip": "API key for authentication",
71 },
72 ),
73 "prompt": (
74 "STRING",
75 {
76 "multiline": True,
77 "default": "",
78 "tooltip": "Text prompt to encode",
79 },
80 ),
81 "enhance_prompt": (
82 "BOOLEAN",
83 {
84 "default": True,
85 "tooltip": "When enabled, the prompt is enhanced using Gemma 3 before encoding",
86 },
87 ),
88 "ckpt_name": (
89 folder_paths.get_filename_list("checkpoints"),
90 {"tooltip": "The name of the checkpoint (model) to load."},
91 ),
92 },
93 }
94
95 RETURN_TYPES = ("CONDITIONING",)
96 RETURN_NAMES = ("conditioning",)
97 FUNCTION = "encode"
98 CATEGORY = "api node/text/Lightricks"
99
100 def encode(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected