MCPcopy
hub / github.com/Lightricks/ComfyUI-LTXVideo / patch_model

Method patch_model

stg.py:208–214  ·  view source on GitHub ↗
(cls, model: ModelPatcher, stg_flag: STGFlag)

Source from the content-addressed store, hash-verified

206
207 @classmethod
208 def patch_model(cls, model: ModelPatcher, stg_flag: STGFlag):
209 transformer_blocks = cls.get_transformer_blocks(model)
210
211 for i, block in enumerate(transformer_blocks):
212 model.set_model_patch_replace(
213 STGBlockWrapper(block, stg_flag, i), "dit", "double_block", i
214 )
215
216 @staticmethod
217 def get_transformer_blocks(model: ModelPatcher):

Callers 4

__init__Method · 0.95
predict_noiseMethod · 0.95
__init__Method · 0.45
predict_noiseMethod · 0.45

Calls 2

STGBlockWrapperClass · 0.85

Tested by

no test coverage detected