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

Method forward

gemma_encoder.py:114–127  ·  view source on GitHub ↗
(self, input_ids, attention_mask, padding_side="right")

Source from the content-addressed store, hash-verified

112 pass
113
114 def forward(self, input_ids, attention_mask, padding_side="right"):
115 # Block 1: Run Gemma model
116 outputs = self.model(
117 input_ids=input_ids,
118 attention_mask=attention_mask,
119 output_hidden_states=True,
120 )
121 all_layer_hiddens = torch.stack(outputs.hidden_states, dim=-1) # [B, T, D, L]
122
123 # Block 2: Feature extraction
124 features = self.feature_extractor(
125 all_layer_hiddens, attention_mask, padding_side
126 )
127 return features # dict with "video" and optionally "audio"
128
129 def encode_token_weights(self, token_weight_pairs):
130 token_pairs = token_weight_pairs["gemma"]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected