class_docstr: A class containing all functions for loading and using adapters weights that are supported in PEFT library. For
  more details about adapters and injecting them in a transformer-based model, check out the PEFT [documentation](https://huggingface.co/docs/peft/index).
  
  Install the latest version of PEFT, and use this mixin to:
  
  - Attach new adapters in the model.
  - Attach multiple adapters and iteratively activate/deactivate them.
  - Activate/deactivate all adapters from the model.
  - Get a list of the active adapters.
docstr: Disable all adapters attached to the model and fallback to inference with the base model only.
  
  If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
  [documentation](https://huggingface.co/docs/peft).
docstr_tok: ["Disable","all","adapters","attached","to","the","model","and","fallback","to","inference","with","the","base","model","only",".","If","you","are","not","familiar","with","adapters","and","PEFT","methods",",","we","invite","you","to","read","more","about","them","on","the","PEFT","[","documentation","]","(","https",":","\/\/huggingface.co\/docs\/peft",")","."]
code: def disable_adapters(self) -> None:
      r"""
      Disable all adapters attached to the model and fallback to inference with the base model only.
  
      If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
      [documentation](https://huggingface.co/docs/peft).
      """
      check_peft_version(min_version=MIN_PEFT_VERSION)
  
      if not self._hf_peft_config_loaded:
          raise ValueError(
              "No adapter loaded. Please load an adapter first."
          )
  
      from peft.tuners.tuners_utils import BaseTunerLayer
  
      for _, module in self.named_modules():
          if isinstance(module, BaseTunerLayer):
              if hasattr(module, "enable_adapters"):
                  module.enable_adapters(enabled=False)
              else:
                  # support for older PEFT versions
                  module.disable_adapters = True
  
file_path: diffusers/src/diffusers/loaders/peft.py
imports: from typing import List, Union
  from ..utils import MIN_PEFT_VERSION, check_peft_version, is_peft_available
label_desc: Use image node_id 3 for calling the PeftAdapterMixin obj's underlying member method code with example usage: obj.disable_adapters() without return types