          input_idx = 1 if switch_sides else 0
          self._output_idx = 0 if switch_sides else 1
          self._input_names = set(self._filter_node(self._config["input_layers"][input_idx]))
  
          self._inputs = self._get_inputs(saved_model.inputs, input_idx)
          self._outputs_dropout = self._get_outputs_dropout()
          self._model = self._make_inference_model(saved_model)
          logger.debug("Initialized: %s", self.__class__.__name__)
  
      @property
      def model(self):
 
</s> remove         self._input_names = set(self._filter_node(self._config["input_layers"][input_idx]))
 </s> add  </s> remove         input_idx = 1 if switch_sides else 0
 </s> add         self._input_idx = 1 if switch_sides else 0 </s> remove         retval = set()
        for idx, (name, inbound) in enumerate(reversed(filtered_structure.items())):
            if idx == 0:
                logger.debug("Adding output layer: '%s'", name)
                retval.add(name)
            if idx != 0 and name not in retval:
                logger.debug("Skipping unused layer: '%s'", name)
                continue
            logger.debug("Adding inbound layers: %s", inbound)
            retval.update(inbound)
        logger.debug("Required layers: %s", retval)
 </s> add         input_split = len(inputs) // 2
        start_idx = input_split * self._input_idx
        retval = inputs[start_idx: start_idx + input_split]
        logger.debug("model inputs: %s, input_split: %s, start_idx: %s, inference_inputs: %s",
                     inputs, input_split, start_idx, retval) </s> remove     @classmethod
    def _get_required_layers(cls, filtered_structure):
        """ Parse through the filtered model structure in reverse order to get the required layers
        from the faceswap model for creating an inference model.
 </s> add             if not inbound:
                break

            inbound_info = self._get_nodes(inbound)

            if any(inb[0] == drop_input for inb in inbound_info):  # Switch inputs
                inbound_info = [(switch_input if inb[0] == drop_input else inb[0], inb[1])
                                for inb in inbound_info]
            struct[layer_info[0]] = inbound_info
            next_layers.extend(inbound_info)

            if not current_layers:
                current_layers = next_layers
                next_layers = []

        struct[switch_input] = []  # Add the input layer
        logger.debug("Model structure: %s", struct)
        return struct

    def _get_inputs(self, inputs):
        """ Obtain the inputs for the requested swap direction. </s> remove         input_split = len(inputs) // 2
        start_idx = input_split * input_index
        retval = inputs[start_idx: start_idx + input_split]
        logger.debug("model inputs: %s, input_split: %s, start_idx: %s, inference_inputs: %s",
                     inputs, input_split, start_idx, retval)
        return retval

    def _get_outputs_dropout(self):
        """ Obtain the output layer names from the full model that will not be used for inference.

        Returns
        -------
        set
            The output layer names from the saved Faceswap model that are not used for inference
            for the requested swap direction
        """
        outputs = self._config["output_layers"]
        if get_backend() == "amd":
            outputs = [outputs[:len(outputs) // 2], outputs[len(outputs) // 2:]]

        output_names = self._filter_node(outputs)
        if not all(isinstance(name, list) for name in output_names):
            output_names = [[name] for name in output_names]
        side_outputs = set(output_names[self._output_idx])
        logger.debug("model outputs: %s, output_names: %s, side_outputs: %s",
                     outputs, output_names, side_outputs)

        outputs_all = {layer
                       for side in output_names
                       for layer in side}
        retval = outputs_all.difference(side_outputs)
        logger.debug("outputs dropout: %s", retval)
 </s> add         nodes = np.array(nodes, dtype="object")[..., :3]
        num_layers = nodes.shape[0]
        nodes = nodes[self._output_idx] if num_layers == 2 else nodes[0]
        retval = [(node[0], node[2]) for node in nodes]
        self._input_names = [inp[0] for inp in self._config["input_layers"]]
          input_idx = 1 if switch_sides else 0
          self._output_idx = 0 if switch_sides else 1
          self._input_names = set(self._filter_node(self._config["input_layers"][input_idx]))
  
        self._input_names = [inp[0] for inp in self._config["input_layers"]]
        self._input_names = [inp[0] for inp in self._config["input_layers"]]
          self._model = self._make_inference_model(saved_model)
          logger.debug("Initialized: %s", self.__class__.__name__)
  
      @property
      def model(self):
keep keep keep keep replace replace keep keep keep keep keep
 plugins.train.model.base - More robust inference model generation 
plugins/train/model/_base.py