Skip to content

Commit

Permalink
bugfix: Catch learn-mask error when no mask type selected
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Oct 12, 2022
1 parent f1e3339 commit 403f981
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/train/model/_base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def __init__(self,
"Mask to use. Please select a mask or disable Penalized Mask "
"Loss.")

if self.config["learn_mask"] and self.config["mask_type"] is None:
raise FaceswapError("'Learn Mask' has been selected but you have not chosen a Mask to "
"use. Please select a mask or disable 'Learn Mask'.")

self._mixed_precision = self.config["mixed_precision"] and get_backend() != "amd"
# self._io = IO(self, model_dir, self._is_predict, self.config["save_optimizer"])
# TODO - Re-enable saving of optimizer once this bug is fixed:
Expand Down

0 comments on commit 403f981

Please sign in to comment.