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

Method __init__

gemma_encoder.py:173–195  ·  view source on GitHub ↗
(self, device="cpu", dtype=dtype, model_options={})

Source from the content-addressed store, hash-verified

171def ltxv_gemma_clip(encoder_path, ltxv_path, processor=None, dtype=None):
172 class _LTXVGemmaTextEncoderModel(LTXVGemmaTextEncoderModel):
173 def __init__(self, device="cpu", dtype=dtype, model_options={}):
174 dtype = torch.bfloat16 # TODO: make this configurable
175
176 gemma_model = Gemma3ForConditionalGeneration.from_pretrained(
177 encoder_path,
178 local_files_only=True,
179 torch_dtype=dtype,
180 )
181
182 feature_extractor, embeddings_processor = load_text_embeddings_pipeline(
183 ltxv_path,
184 dtype=dtype,
185 fallback_proj_path=encoder_path / "proj_linear.safetensors",
186 )
187
188 super().__init__(
189 model=gemma_model,
190 feature_extractor=feature_extractor,
191 embeddings_processor=embeddings_processor,
192 processor=processor,
193 dtype=dtype,
194 device=device,
195 )
196
197 return _LTXVGemmaTextEncoderModel
198

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected