From 678c050f11d7f03dcb2751793fb0180368021c02 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Wed, 8 Apr 2026 15:43:42 +0200 Subject: [PATCH] fix: make normalize(x1) assignment explicit in training loop normalize() uses in-place ops so it worked, but reading the return value makes the intent clear and guards against future refactors. Co-Authored-By: Claude Sonnet 4.6 --- nodes/selva_lora_trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/selva_lora_trainer.py b/nodes/selva_lora_trainer.py index 42d8bf0..9bbb434 100644 --- a/nodes/selva_lora_trainer.py +++ b/nodes/selva_lora_trainer.py @@ -740,7 +740,7 @@ class SelvaLoraTrainer: sync_f = torch.stack([x.squeeze(0) for x in sync_list]).to(device, dtype) text_clip = torch.stack([x.squeeze(0) for x in text_list]).to(device, dtype) - generator.normalize(x1) + x1 = generator.normalize(x1) if timestep_mode == "logit_normal" or ( timestep_mode == "curriculum" and step <= curriculum_switch_step