From fc78b07332c6943532004f7c9ce5fc71e1553923 Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Sat, 1 Aug 2026 10:05:42 -0600 Subject: [PATCH] Attach the ema to the base model so it can be used on specific models --- jobs/process/BaseSDTrainProcess.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jobs/process/BaseSDTrainProcess.py b/jobs/process/BaseSDTrainProcess.py index c73a621..ff0a50d 100644 --- a/jobs/process/BaseSDTrainProcess.py +++ b/jobs/process/BaseSDTrainProcess.py @@ -794,6 +794,9 @@ class BaseSDTrainProcess(BaseTrainProcess): use_feedback=self.train_config.ema_config.use_feedback, param_multiplier=self.train_config.ema_config.param_multiplier, ) + # expose to the model: models that run an EMA-teacher forward during training + # (e.g. wan21_pixel self_flow) read it from here + self.sd.ema = self.ema def before_dataset_load(self): pass