From e836b7f66d93f411515f593d17fa17eaca3bb5b1 Mon Sep 17 00:00:00 2001 From: Kohya S <52813779+kohya-ss@users.noreply.github.com> Date: Sat, 30 Aug 2025 09:30:24 +0900 Subject: [PATCH] fix: chroma LoRA training without Text Encode caching --- library/flux_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/flux_utils.py b/library/flux_utils.py index 3f0a0d63..22054854 100644 --- a/library/flux_utils.py +++ b/library/flux_utils.py @@ -220,8 +220,12 @@ class DummyTextModel(torch.nn.Module): class DummyCLIPL(torch.nn.Module): def __init__(self): super().__init__() - self.output_shape = (77, 1) # Note: The original code had (77, 768), but we use (77, 1) for the dummy output - self.dummy_param = torch.nn.Parameter(torch.zeros(1)) # get dtype and device from this parameter + self.output_shape = (77, 1) # Note: The original code had (77, 768), but we use (77, 1) for the dummy output + + # dtype and device from these parameters. train_network.py accesses them + self.dummy_param = torch.nn.Parameter(torch.zeros(1)) + self.dummy_param_2 = torch.nn.Parameter(torch.zeros(1)) + self.dummy_param_3 = torch.nn.Parameter(torch.zeros(1)) self.text_model = DummyTextModel() @property