loaders.mdx 1.33 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!--Copyright 2022 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->

# Loaders

Pedro Cuenca's avatar
Pedro Cuenca committed
15
There are many ways to train adapter neural networks for diffusion models, such as 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- [Textual Inversion](./training/text_inversion.mdx)
- [LoRA](https://github.com/cloneofsimo/lora)
- [Hypernetworks](https://arxiv.org/abs/1609.09106)

Such adapter neural networks often only consist of a fraction of the number of weights compared 
to the pretrained model and as such are very portable. The Diffusers library offers an easy-to-use
API to load such adapter neural networks via the [`loaders.py` module](https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders.py). 

**Note**: This module is still highly experimental and prone to future changes.

## LoaderMixins

### UNet2DConditionLoadersMixin

[[autodoc]] loaders.UNet2DConditionLoadersMixin