  
  from lib.image import read_image_meta
  from lib.keypress import KBHit
  from lib.multithreading import MultiThread
  from lib.utils import (get_folder, get_image_paths, FaceswapError, _image_extensions)
  from plugins.plugin_loader import PluginLoader
  
  if sys.version_info < (3, 8):
      from typing_extensions import Literal
  else:
 
</s> remove from typing import cast, Callable, Dict, List, Optional, TYPE_CHECKING
 </s> add from typing import cast, Callable, Dict, List, Optional, Tuple, TYPE_CHECKING </s> remove         parent_flags = dict(mask_toggle="_toggle_preview_mask", update="_refresh_preview")
 </s> add         parent_flags = dict(mask_toggle="request_mask_toggle", update="request_refresh") </s> remove     def get_optional_arguments():
 </s> add     def get_optional_arguments() -> List[Dict[str, Any]]:
from lib.utils import get_dpi, get_folder, get_image_paths, FaceswapError, _image_extensions
  
  from lib.image import read_image_meta
  from lib.keypress import KBHit
  from lib.multithreading import MultiThread
from lib.utils import get_dpi, get_folder, get_image_paths, FaceswapError, _image_extensions
  from plugins.plugin_loader import PluginLoader
  
  if sys.version_info < (3, 8):
      from typing_extensions import Literal
  else:
keep keep keep keep replace keep keep keep keep keep
 Live Preview - Replace cv2 with matplotlib viewer 
scripts/train.py