From 77a160d8867422ffdf7be34d8879fe29e05a8040 Mon Sep 17 00:00:00 2001 From: Kohya S Date: Sun, 20 Jul 2025 21:25:43 +0900 Subject: [PATCH] fix: skip LoRA creation for None text encoders (CLIP-L for Chroma) --- networks/lora_flux.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/networks/lora_flux.py b/networks/lora_flux.py index 0b30f1b8..ddc91608 100644 --- a/networks/lora_flux.py +++ b/networks/lora_flux.py @@ -892,6 +892,9 @@ class LoRANetwork(torch.nn.Module): skipped_te = [] for i, text_encoder in enumerate(text_encoders): index = i + if text_encoder is None: + logger.info(f"Text Encoder {index+1} is None, skipping LoRA creation for this encoder.") + continue if not train_t5xxl and index > 0: # 0: CLIP, 1: T5XXL, so we skip T5XXL if train_t5xxl is False break