You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/api/loaders/peft.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,14 @@ specific language governing permissions and limitations under the License.
12
12
13
13
# PEFT
14
14
15
-
Diffusers supports working with adapters (such as [LoRA](../../using-diffusers/loading_adapters)) via the [`peft` library](https://huggingface.co/docs/peft/index). We provide a `PeftAdapterMixin` class to handle this for modeling classes in Diffusers (such as [`UNet2DConditionModel`]).
15
+
Diffusers supports loading adapters such as [LoRA](../../using-diffusers/loading_adapters) with the [PEFT](https://huggingface.co/docs/peft/index) library with the [`~loaders.peft.PeftAdapterMixin`] class. This allows modeling classes in Diffusers like [`UNet2DConditionModel`] to load an adapter.
16
16
17
17
<Tip>
18
18
19
-
Refer to [this doc](../../tutorials/using_peft_for_inference.md)to get an overview of how to work with `peft` in Diffusers for inference.
19
+
Refer to the [Inference with PEFT](../../tutorials/using_peft_for_inference.md)tutorial for an overview of how to use PEFT in Diffusers for inference.
Copy file name to clipboardExpand all lines: src/diffusers/loaders/peft.py
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,13 @@
20
20
classPeftAdapterMixin:
21
21
"""
22
22
A class containing all functions for loading and using adapters weights that are supported in PEFT library. For
23
-
more details about adapters and injecting them on a transformer-based model, check out the documentation of PEFT
24
-
library: https://huggingface.co/docs/peft/index.
23
+
more details about adapters and injecting them in a transformer-based model, check out the PEFT [documentation](https://huggingface.co/docs/peft/index).
25
24
26
-
27
-
With this mixin, if the correct PEFT version is installed, it is possible to:
25
+
Install the latest version of PEFT, and use this mixin to:
28
26
29
27
- Attach new adapters in the model.
30
-
- Attach multiple adapters and iteratively activate / deactivate them.
31
-
- Activate / deactivate all adapters from the model.
28
+
- Attach multiple adapters and iteratively activate/deactivate them.
29
+
- Activate/deactivate all adapters from the model.
0 commit comments