mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 11:11:37 +00:00
Fixed some new bugs i added. woops
This commit is contained in:
@@ -163,7 +163,7 @@ class SDTrainer(BaseSDTrainProcess):
|
||||
loss = loss * mask_multiplier
|
||||
|
||||
prior_loss = None
|
||||
if self.train_config.inverted_mask_prior and prior_pred is not None:
|
||||
if self.train_config.inverted_mask_prior and prior_pred is not None and prior_mask_multiplier is not None:
|
||||
# to a loss to unmasked areas of the prior for unmasked regularization
|
||||
prior_loss = torch.nn.functional.mse_loss(
|
||||
prior_pred.float(),
|
||||
|
||||
Reference in New Issue
Block a user