def set_active_adapters(self, adapter_names: Union[List[str], str], offload: str = None):
        """Set activated adapters

        Args:
            adapter_names(`Union[List[str], str]`): The adapters needed to be activated
            offload(`str`): Whether to offload the deactivated ones to `cpu` or `meta` device
        """
        if not adapter_names:
            adapter_names = []

        if isinstance(adapter_names, str):
            adapter_names = [adapter_names]

        adapter_names = set(adapter_names)
        for adapter_name in (adapter_names & set(self.adapters.keys())):
            self.activate_adapter(adapter_name)

        for adapter_name in (set(self.adapters.keys()) - adapter_names):
            self.deactivate_adapter(adapter_name, offload)

        self.active_adapters = (adapter_names & set(self.adapters.keys()))
Set activated adapters

        Args:
            adapter_names(`Union[List[str], str]`): The adapters needed to be activated
            offload(`str`): Whether to offload the deactivated ones to `cpu` or `meta` device
        
swift/tuners/base.py