Fixed offload and quantize order of ltx 2.3 text encoder.

This commit is contained in:
Jaret Burkett
2026-04-07 15:11:50 -06:00
parent 0dcbabf6af
commit 9ca58e9aa2

View File

@@ -425,6 +425,12 @@ class LTX2Model(BaseModel):
text_encoder.model.vision_tower = None text_encoder.model.vision_tower = None
flush() flush()
if self.model_config.quantize_te:
self.print_and_status_update("Quantizing Text Encoder")
quantize(text_encoder, weights=get_qtype(self.model_config.qtype_te))
freeze(text_encoder)
flush()
if ( if (
self.model_config.layer_offloading self.model_config.layer_offloading
and self.model_config.layer_offloading_text_encoder_percent > 0 and self.model_config.layer_offloading_text_encoder_percent > 0
@@ -441,12 +447,6 @@ class LTX2Model(BaseModel):
text_encoder.to(self.device_torch, dtype=dtype) text_encoder.to(self.device_torch, dtype=dtype)
flush() flush()
if self.model_config.quantize_te:
self.print_and_status_update("Quantizing Text Encoder")
quantize(text_encoder, weights=get_qtype(self.model_config.qtype_te))
freeze(text_encoder)
flush()
self.print_and_status_update("Loading VAEs and other components") self.print_and_status_update("Loading VAEs and other components")
if combined_state_dict is not None: if combined_state_dict is not None:
original_vae_ckpt = get_model_state_dict_from_combined_ckpt( original_vae_ckpt = get_model_state_dict_from_combined_ckpt(