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

Method __init__

gemma_encoder.py:87–106  ·  view source on GitHub ↗
(
        self,
        model: Gemma3ForConditionalGeneration,
        feature_extractor,  # FeatureExtractorV1/V2
        embeddings_processor,  # VideoEmbeddingsProcessor or AVEmbeddingsProcessor
        processor: Gemma3Processor | None = None,
        dtype=torch.bfloat16,
        device="cpu",
    )

Source from the content-addressed store, hash-verified

85
86class LTXVGemmaTextEncoderModel(torch.nn.Module):
87 def __init__(
88 self,
89 model: Gemma3ForConditionalGeneration,
90 feature_extractor, # FeatureExtractorV1/V2
91 embeddings_processor, # VideoEmbeddingsProcessor or AVEmbeddingsProcessor
92 processor: Gemma3Processor | None = None,
93 dtype=torch.bfloat16,
94 device="cpu",
95 ):
96 super().__init__()
97 self.model = model
98 self.processor = processor
99 self.feature_extractor = feature_extractor.to(dtype=dtype)
100 self.embeddings_processor = embeddings_processor.to(dtype=dtype)
101 self.dtypes = set([dtype])
102 # Cache an estimate of memory required to load/keep the model on device
103 # weights size + small overhead
104 self._model_memory_required = (
105 comfy.model_management.module_size(self.model) + 256 * 1024 * 1024
106 )
107
108 def set_clip_options(self, options):
109 pass

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected