Added support for training vision direct weight adapters
This commit is contained in:
1 parent
5c8fcc8a4e
commit
3a1f464132
3 files changed
+78
-16
No files matched your search
@@ -1584,6 +1584,8 @@ class SDTrainer(BaseSDTrainProcess):
|
||||
self.scaler.update()
|
||||
|
||||
self.optimizer.zero_grad(set_to_none=True)
|
||||
if self.adapter and isinstance(self.adapter, CustomAdapter):
|
||||
self.adapter.post_weight_update()
|
||||
if self.ema is not None:
|
||||
with self.timer('ema_update'):
|
||||
self.ema.update()
|
||||
|
||||
Reference in new issue
Block a user