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 <noreply@anthropic.com>
This commit is contained in:
2026-04-08 15:43:42 +02:00
parent 1be07a80d2
commit 678c050f11
+1 -1
View File
@@ -740,7 +740,7 @@ class SelvaLoraTrainer:
sync_f = torch.stack([x.squeeze(0) for x in sync_list]).to(device, dtype) 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) 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 ( if timestep_mode == "logit_normal" or (
timestep_mode == "curriculum" and step <= curriculum_switch_step timestep_mode == "curriculum" and step <= curriculum_switch_step