      "Allows for the experimentation of various standard Networks as the encoder and takes "
      "inspiration from Nvidia's StyleGAN for the Decoder. It is highly recommended to research to "
      "understand the parameters better.")
  
  _ENCODERS: List[str] = [
      "densenet121", "densenet169", "densenet201", "inception_resnet_v2", "inception_v3",
      "mobilenet", "mobilenet_v2", "nasnet_large", "nasnet_mobile", "resnet50", "vgg16", "vgg19",
      "xception", "fs_original"]
  
  if get_backend() != "amd":
      _ENCODERS.extend(["efficientnet_b0", "efficientnet_b1", "efficientnet_b2", "efficientnet_b3",
                        "efficientnet_b4", "efficientnet_b5", "efficientnet_b6", "efficientnet_b7",
                        "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
 
</s> remove if get_backend() != "amd":
    _ENCODERS.extend(["efficientnet_b0", "efficientnet_b1", "efficientnet_b2", "efficientnet_b3",
                      "efficientnet_b4", "efficientnet_b5", "efficientnet_b6", "efficientnet_b7",
                      "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
                      "efficientnet_v2_b3", "efficientnet_v2_l", "efficientnet_v2_m",
                      "efficientnet_v2_s", "mobilenet_v3_large", "mobilenet_v3_small",
                      "resnet50_v2", "resnet101", "resnet101_v2", "resnet152", "resnet152_v2"])
_ENCODERS = sorted(_ENCODERS)


_DEFAULTS = dict(
 </s> add _DEFAULTS = { </s> remove from lib.utils import get_backend
 </s> add  </s> remove         if get_backend() == "amd" and model.no_amd:
            valid = [k for k, v in _MODEL_MAPPING.items() if not v.no_amd]
            raise FaceswapError(f"'{arch}' is not compatible with the AMD backend. Choose one of "
                                f"{valid}.")

 </s> add  </s> remove     enc_architecture=dict(
        default="fs_original",
        info="The encoder architecture to use. See the relevant config sections for specific "
             "architecture tweaking.\nNB: For keras based pre-built models, the global "
             "initializers and padding options will be ignored for the selected encoder."
             "\n\n\tdensenet: (32px -224px). Ref: Densely Connected Convolutional Networks "
             "(2016): https://arxiv.org/abs/1608.06993?source=post_page"
             "\n\n\tefficientnet: [Tensorflow 2.3+ only] EfficientNet has numerous variants (B0 - "
             "B8) that increases the model width, depth and dimensional space at each step. The "
             "minimum input resolution is 32px for all variants. The maximum input resolution for "
             "each variant is: b0: 224px, b1: 240px, b2: 260px, b3: 300px, b4: 380px, b5: 456px, "
             "b6: 528px, b7 600px. Ref: Rethinking Model Scaling for Convolutional Neural "
             "Networks (2020): https://arxiv.org/abs/1905.11946"
             "\n\n\tefficientnet_v2: [Tensorflow 2.8+ only] EfficientNetV2 is the follow up to "
             "efficientnet. It has numerous variants (B0 - B3 and Small, Medium and Large) that "
             "increases the model width, depth and dimensional space at each step. The minimum "
             "input resolution is 32px for all variants. The maximum input resolution for each "
             "variant is: b0: 224px, b1: 240px, b2: 260px, b3: 300px, s: 384px, m: 480px, l: "
             "480px. Ref: EfficientNetV2: Smaller Models and Faster Training (2021): "
             "https://arxiv.org/abs/2104.00298"
             "\n\n\tfs_original: (32px - 1024px). A configurable variant of the original facewap "
             "encoder. ImageNet weights cannot be loaded for this model. Additional parameters "
             "can be configured with the 'fs_enc' options. A version of this encoder is used in "
             "the following models: Original, Original (lowmem), Dfaker, DFL-H128, DFL-SAE, IAE, "
             "Lightweight."
             "\n\n\tinception_resnet_v2: (75px - 299px). Ref: Inception-ResNet and the Impact of "
             "Residual Connections on Learning (2016): https://arxiv.org/abs/1602.07261"
             "\n\n\tinceptionV3: (75px - 299px). Ref: Rethinking the Inception Architecture for "
             "Computer Vision (2015): https://arxiv.org/abs/1512.00567"
             "\n\n\tmobilenet: (32px - 224px). Additional MobileNet parameters can be set with "
             "the 'mobilenet' options. Ref: MobileNets: Efficient Convolutional Neural Networks "
             "for Mobile Vision Applications (2017): https://arxiv.org/abs/1704.04861"
             "\n\n\tmobilenet_v2: (32px - 224px). Additional MobileNet parameters can be set with "
             "the 'mobilenet' options. Ref: MobileNetV2: Inverted Residuals and Linear "
             "Bottlenecks (2018): https://arxiv.org/abs/1801.04381"
             "\n\n\tmobilenet_v3: (32px - 224px). Additional MobileNet parameters can be set with "
             "the 'mobilenet' options. Ref: Searching for MobileNetV3 (2019): "
             "https://arxiv.org/pdf/1905.02244.pdf"
             "\n\n\tnasnet: (32px - 331px (large) or 224px (mobile)). Ref: Learning Transferable "
             "Architectures for Scalable Image Recognition (2017): "
             "https://arxiv.org/abs/1707.07012"
             "\n\n\tresnet: (32px - 224px). Deep Residual Learning for Image Recognition (2015): "
             "https://arxiv.org/abs/1512.03385"
             "\n\n\tvgg: (32px - 224px). Very Deep Convolutional Networks for Large-Scale Image "
             "Recognition (2014): https://arxiv.org/abs/1409.1556"
             "\n\n\txception: (71px - 229px). Ref: Deep Learning with Depthwise Separable "
             "Convolutions (2017): https://arxiv.org/abs/1409.1556.\n",
        datatype=str,
        choices=_ENCODERS,
        gui_radio=False,
        group="encoder",
        fixed=True),
    enc_scaling=dict(
        default=7,
        info="Input scaling for the encoder. Some of the encoders have large input sizes, which "
             "often are not helpful for Faceswap. This setting scales the dimensional space that "
             "the encoder works in. For example an encoder with a maximum input size of 224px "
             "will be input an image of 112px at 50%% scaling. See the Architecture tooltip for "
             "the minimum and maximum sizes for each encoder. NB: The input size will be rounded "
             "down to the nearest 16 pixels.",
        datatype=int,
        min_max=(0, 100),
        rounding=1,
        group="encoder",
        fixed=True),
    enc_load_weights=dict(
        default=True,
        info="Load pre-trained weights trained on ImageNet data. Only available for non-Faceswap "
             "encoders (i.e. those not beginning with 'fs'). NB: If you use the global 'load "
             "weights' option and have selected to load weights from a previous model's 'encoder' "
             "or 'keras_encoder' then the weights loaded here will be replaced by the weights "
             "loaded from your saved model.",
        datatype=bool,
        group="encoder",
        fixed=True),
 </s> add     "enc_architecture": {
        "default": "fs_original",
        "info": (
            "The encoder architecture to use. See the relevant config sections for specific "
            "architecture tweaking.\nNB: For keras based pre-built models, the global "
            "initializers and padding options will be ignored for the selected encoder."
            "\n\n\tdensenet: (32px -224px). Ref: Densely Connected Convolutional Networks "
            "(2016): https://arxiv.org/abs/1608.06993?source=post_page"
            "\n\n\tefficientnet: [Tensorflow 2.3+ only] EfficientNet has numerous variants (B0 - "
            "B8) that increases the model width, depth and dimensional space at each step. The "
            "minimum input resolution is 32px for all variants. The maximum input resolution for "
            "each variant is: b0: 224px, b1: 240px, b2: 260px, b3: 300px, b4: 380px, b5: 456px, "
            "b6: 528px, b7 600px. Ref: Rethinking Model Scaling for Convolutional Neural "
            "Networks (2020): https://arxiv.org/abs/1905.11946"
            "\n\n\tefficientnet_v2: [Tensorflow 2.8+ only] EfficientNetV2 is the follow up to "
            "efficientnet. It has numerous variants (B0 - B3 and Small, Medium and Large) that "
            "increases the model width, depth and dimensional space at each step. The minimum "
            "input resolution is 32px for all variants. The maximum input resolution for each "
            "variant is: b0: 224px, b1: 240px, b2: 260px, b3: 300px, s: 384px, m: 480px, l: "
            "480px. Ref: EfficientNetV2: Smaller Models and Faster Training (2021): "
            "https://arxiv.org/abs/2104.00298"
            "\n\n\tfs_original: (32px - 1024px). A configurable variant of the original facewap "
            "encoder. ImageNet weights cannot be loaded for this model. Additional parameters "
            "can be configured with the 'fs_enc' options. A version of this encoder is used in "
            "the following models: Original, Original (lowmem), Dfaker, DFL-H128, DFL-SAE, IAE, "
            "Lightweight."
            "\n\n\tinception_resnet_v2: (75px - 299px). Ref: Inception-ResNet and the Impact of "
            "Residual Connections on Learning (2016): https://arxiv.org/abs/1602.07261"
            "\n\n\tinceptionV3: (75px - 299px). Ref: Rethinking the Inception Architecture for "
            "Computer Vision (2015): https://arxiv.org/abs/1512.00567"
            "\n\n\tmobilenet: (32px - 224px). Additional MobileNet parameters can be set with "
            "the 'mobilenet' options. Ref: MobileNets: Efficient Convolutional Neural Networks "
            "for Mobile Vision Applications (2017): https://arxiv.org/abs/1704.04861"
            "\n\n\tmobilenet_v2: (32px - 224px). Additional MobileNet parameters can be set with "
            "the 'mobilenet' options. Ref: MobileNetV2: Inverted Residuals and Linear "
            "Bottlenecks (2018): https://arxiv.org/abs/1801.04381"
            "\n\n\tmobilenet_v3: (32px - 224px). Additional MobileNet parameters can be set with "
            "the 'mobilenet' options. Ref: Searching for MobileNetV3 (2019): "
            "https://arxiv.org/pdf/1905.02244.pdf"
            "\n\n\tnasnet: (32px - 331px (large) or 224px (mobile)). Ref: Learning Transferable "
            "Architectures for Scalable Image Recognition (2017): "
            "https://arxiv.org/abs/1707.07012"
            "\n\n\tresnet: (32px - 224px). Deep Residual Learning for Image Recognition (2015): "
            "https://arxiv.org/abs/1512.03385"
            "\n\n\tvgg: (32px - 224px). Very Deep Convolutional Networks for Large-Scale Image "
            "Recognition (2014): https://arxiv.org/abs/1409.1556"
            "\n\n\txception: (71px - 229px). Ref: Deep Learning with Depthwise Separable "
            "Convolutions (2017): https://arxiv.org/abs/1409.1556.\n"),
        "datatype": str,
        "choices": _ENCODERS,
        "gui_radio": False,
        "group": "encoder",
        "fixed": True},
    "enc_scaling": {
        "default": 7,
        "info": (
            "Input scaling for the encoder. Some of the encoders have large input sizes, which "
            "often are not helpful for Faceswap. This setting scales the dimensional space that "
            "the encoder works in. For example an encoder with a maximum input size of 224px "
            "will be input an image of 112px at 50%% scaling. See the Architecture tooltip for "
            "the minimum and maximum sizes for each encoder. NB: The input size will be rounded "
            "down to the nearest 16 pixels."),
        "datatype": int,
        "min_max": (0, 100),
        "rounding": 1,
        "group": "encoder",
        "fixed": True},
    "enc_load_weights": {
        "default": True,
        "info": (
            "Load pre-trained weights trained on ImageNet data. Only available for non-"
            "Faceswap encoders (i.e. those not beginning with 'fs'). NB: If you use the global "
            "'load weights' option and have selected to load weights from a previous model's "
            "'encoder' or 'keras_encoder' then the weights loaded here will be replaced by the "
            "weights loaded from your saved model."),
        "datatype": bool,
        "group": "encoder",
        "fixed": True}, </s> remove     mobilenet_width=dict(
        default=1.0,
        info="The width multiplier for mobilenet encoders. Controls the width of the "
             "network. Values less than 1.0 proportionally decrease the number of filters within "
             "each layer. Values greater than 1.0 proportionally increase the number of filters "
             "within each layer. 1.0 is the default number of layers used within the paper.\n"
             "NB: This option is ignored for any non-mobilenet encoders.\n"
             "NB: If loading ImageNet weights, then for MobilenetV1 only values of '0.25', "
             "'0.5', '0.75' or '1.0 can be selected. For MobilenetV2 only values of '0.35', "
             "'0.50', '0.75', '1.0', '1.3' or '1.4' can be selected. For mobilenet_v3 only values "
             "of '0.75' or '1.0' can be selected",
        datatype=float,
        min_max=(0.1, 2.0),
        rounding=2,
        group="mobilenet encoder configuration",
        fixed=True),
    mobilenet_depth=dict(
        default=1,
        info="The depth multiplier for MobilenetV1 encoder. This is the depth multiplier "
             "for depthwise convolution (known as the resolution multiplier within the original "
             "paper).\n"
             "NB: This option is only used for MobilenetV1 and is ignored for all other "
             "encoders.\n"
             "NB: If loading ImageNet weights, this must be set to 1.",
        datatype=int,
        min_max=(1, 10),
        rounding=1,
        group="mobilenet encoder configuration",
        fixed=True),
    mobilenet_dropout=dict(
        default=0.001,
        info="The dropout rate for MobilenetV1 encoder.\n"
             "NB: This option is only used for MobilenetV1 and is ignored for all other "
             "encoders.",
        datatype=float,
        min_max=(0.001, 2.0),
        rounding=3,
        group="mobilenet encoder configuration",
        fixed=True),
    mobilenet_minimalistic=dict(
        default=False,
        info="Use a minimilist version of MobilenetV3.\n"
             "In addition to large and small models MobilenetV3 also contains so-called "
             "minimalistic models, these models have the same per-layer dimensions characteristic "
             "as MobilenetV3 however, they don't utilize any of the advanced blocks "
             "(squeeze-and-excite units, hard-swish, and 5x5 convolutions). While these models "
             "are less efficient on CPU, they are much more performant on GPU/DSP.\n"
             "NB: This option is only used for MobilenetV3 and is ignored for all other "
             "encoders.\n",
        datatype=bool,
        group="mobilenet encoder configuration",
        fixed=True),
    )
 </s> add     "mobilenet_width": {
        "default": 1.0,
        "info": (
            "The width multiplier for mobilenet encoders. Controls the width of the "
            "network. Values less than 1.0 proportionally decrease the number of filters within "
            "each layer. Values greater than 1.0 proportionally increase the number of filters "
            "within each layer. 1.0 is the default number of layers used within the paper.\n"
            "NB: This option is ignored for any non-mobilenet encoders.\n"
            "NB: If loading ImageNet weights, then for MobilenetV1 only values of '0.25', "
            "'0.5', '0.75' or '1.0 can be selected. For MobilenetV2 only values of '0.35', "
            "'0.50', '0.75', '1.0', '1.3' or '1.4' can be selected. For mobilenet_v3 only values "
            "of '0.75' or '1.0' can be selected"),
        "datatype": float,
        "min_max": (0.1, 2.0),
        "rounding": 2,
        "group": "mobilenet encoder configuration",
        "fixed": True},
    "mobilenet_depth": {
        "default": 1,
        "info": (
            "The depth multiplier for MobilenetV1 encoder. This is the depth multiplier "
            "for depthwise convolution (known as the resolution multiplier within the original "
            "paper).\n"
            "NB: This option is only used for MobilenetV1 and is ignored for all other "
            "encoders.\n"
            "NB: If loading ImageNet weights, this must be set to 1."),
        "datatype": int,
        "min_max": (1, 10),
        "rounding": 1,
        "group": "mobilenet encoder configuration",
        "fixed": True},
    "mobilenet_dropout": {
        "default": 0.001,
        "info": (
            "The dropout rate for MobilenetV1 encoder.\n"
            "NB: This option is only used for MobilenetV1 and is ignored for all other "
            "encoders."),
        "datatype": float,
        "min_max": (0.001, 2.0),
        "rounding": 3,
        "group": "mobilenet encoder configuration",
        "fixed": True},
    "mobilenet_minimalistic": {
        "default": False,
        "info": (
            "Use a minimilist version of MobilenetV3.\n"
            "In addition to large and small models MobilenetV3 also contains so-called "
            "minimalistic models, these models have the same per-layer dimensions characteristic "
            "as MobilenetV3 however, they don't utilize any of the advanced blocks "
            "(squeeze-and-excite units, hard-swish, and 5x5 convolutions). While these models "
            "are less efficient on CPU, they are much more performant on GPU/DSP.\n"
            "NB: This option is only used for MobilenetV3 and is ignored for all other "
            "encoders.\n"),
        "datatype": bool,
        "group": "mobilenet encoder configuration",
        "fixed": True},
    }
_ENCODERS: List[str] = sorted([
    "densenet121", "densenet169", "densenet201", "efficientnet_b0", "efficientnet_b1",
    "efficientnet_b2", "efficientnet_b3", "efficientnet_b4", "efficientnet_b5", "efficientnet_b6",
    "efficientnet_b7", "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
    "efficientnet_v2_b3", "efficientnet_v2_l", "efficientnet_v2_m", "efficientnet_v2_s",
    "inception_resnet_v2", "inception_v3", "mobilenet", "mobilenet_v2", "mobilenet_v3_large",
    "mobilenet_v3_small", "nasnet_large", "nasnet_mobile", "resnet50", "resnet50_v2", "resnet101",
    "resnet101_v2", "resnet152", "resnet152_v2", "vgg16", "vgg19", "xception", "fs_original"])
      "Allows for the experimentation of various standard Networks as the encoder and takes "
      "inspiration from Nvidia's StyleGAN for the Decoder. It is highly recommended to research to "
      "understand the parameters better.")
  
_ENCODERS: List[str] = sorted([
    "densenet121", "densenet169", "densenet201", "efficientnet_b0", "efficientnet_b1",
    "efficientnet_b2", "efficientnet_b3", "efficientnet_b4", "efficientnet_b5", "efficientnet_b6",
    "efficientnet_b7", "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
    "efficientnet_v2_b3", "efficientnet_v2_l", "efficientnet_v2_m", "efficientnet_v2_s",
    "inception_resnet_v2", "inception_v3", "mobilenet", "mobilenet_v2", "mobilenet_v3_large",
    "mobilenet_v3_small", "nasnet_large", "nasnet_mobile", "resnet50", "resnet50_v2", "resnet101",
    "resnet101_v2", "resnet152", "resnet152_v2", "vgg16", "vgg19", "xception", "fs_original"])
_ENCODERS: List[str] = sorted([
    "densenet121", "densenet169", "densenet201", "efficientnet_b0", "efficientnet_b1",
    "efficientnet_b2", "efficientnet_b3", "efficientnet_b4", "efficientnet_b5", "efficientnet_b6",
    "efficientnet_b7", "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
    "efficientnet_v2_b3", "efficientnet_v2_l", "efficientnet_v2_m", "efficientnet_v2_s",
    "inception_resnet_v2", "inception_v3", "mobilenet", "mobilenet_v2", "mobilenet_v3_large",
    "mobilenet_v3_small", "nasnet_large", "nasnet_mobile", "resnet50", "resnet50_v2", "resnet101",
    "resnet101_v2", "resnet152", "resnet152_v2", "vgg16", "vgg19", "xception", "fs_original"])
_ENCODERS: List[str] = sorted([
    "densenet121", "densenet169", "densenet201", "efficientnet_b0", "efficientnet_b1",
    "efficientnet_b2", "efficientnet_b3", "efficientnet_b4", "efficientnet_b5", "efficientnet_b6",
    "efficientnet_b7", "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
    "efficientnet_v2_b3", "efficientnet_v2_l", "efficientnet_v2_m", "efficientnet_v2_s",
    "inception_resnet_v2", "inception_v3", "mobilenet", "mobilenet_v2", "mobilenet_v3_large",
    "mobilenet_v3_small", "nasnet_large", "nasnet_mobile", "resnet50", "resnet50_v2", "resnet101",
    "resnet101_v2", "resnet152", "resnet152_v2", "vgg16", "vgg19", "xception", "fs_original"])
_ENCODERS: List[str] = sorted([
    "densenet121", "densenet169", "densenet201", "efficientnet_b0", "efficientnet_b1",
    "efficientnet_b2", "efficientnet_b3", "efficientnet_b4", "efficientnet_b5", "efficientnet_b6",
    "efficientnet_b7", "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
    "efficientnet_v2_b3", "efficientnet_v2_l", "efficientnet_v2_m", "efficientnet_v2_s",
    "inception_resnet_v2", "inception_v3", "mobilenet", "mobilenet_v2", "mobilenet_v3_large",
    "mobilenet_v3_small", "nasnet_large", "nasnet_mobile", "resnet50", "resnet50_v2", "resnet101",
    "resnet101_v2", "resnet152", "resnet152_v2", "vgg16", "vgg19", "xception", "fs_original"])
  
  if get_backend() != "amd":
      _ENCODERS.extend(["efficientnet_b0", "efficientnet_b1", "efficientnet_b2", "efficientnet_b3",
                        "efficientnet_b4", "efficientnet_b5", "efficientnet_b6", "efficientnet_b7",
                        "efficientnet_v2_b0", "efficientnet_v2_b1", "efficientnet_v2_b2",
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Remove plaidML support (#1325)

* Remove PlaidML reference from readme files

* Remove AMD option from installers

* remove amd requirements and update setup.py

* remove plaidml test from CI workflow

* gpustats: remove plaidml backend

* plaid removals:
  - faceswap.py - python version check
  - setup.cfg - plaidml typing ignore
  - lib.keras_utils - All plaid code
  - lib.launcher.py - All plaidml checks and configuration

* remove tf2.2 specific code from GUI event reader

* lib.model - remove all plaidml implementations

* plugins.extract - remove plaidml code

* plugins.train remove plaidml code

* lib.convert - remove plaidml code

* tools.model: remove plaidml code

* Remove plaidML tests from unit tests

* remove plaidml_utils and docsting cleanups

* Remove plaidML refs from configs

* fix keras imports 
plugins/train/model/phaze_a_defaults.py