Skip to content

Commit 823e3c0

Browse files
author
mike dupont
committed
newfiles
1 parent 9345e0e commit 823e3c0

23 files changed

+15076
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
13+
# Pipelines
14+
15+
The [`DiffusionPipeline`] is the quickest way to load any pretrained diffusion pipeline from the [Hub](https://huggingface.co/models?library=diffusers) for inference.
16+
17+
<Tip>
18+
19+
You shouldn't use the [`DiffusionPipeline`] class for training or finetuning a diffusion model. Individual
20+
components (for example, [`UNet2DModel`] and [`UNet2DConditionModel`]) of diffusion pipelines are usually trained individually, so we suggest directly working with them instead.
21+
22+
</Tip>
23+
24+
The pipeline type (for example [`StableDiffusionPipeline`]) of any diffusion pipeline loaded with [`~DiffusionPipeline.from_pretrained`] is automatically
25+
detected and pipeline components are loaded and passed to the `__init__` function of the pipeline.
26+
27+
Any pipeline object can be saved locally with [`~DiffusionPipeline.save_pretrained`].
28+
29+
## DiffusionPipeline
30+
31+
[[autodoc]] DiffusionPipeline
32+
- all
33+
- __call__
34+
- device
35+
- to
36+
- components

docs/source/en/api/loaders.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
13+
# Loaders
14+
15+
Adapters (textual inversion, LoRA, hypernetworks) allow you to modify a diffusion model to generate images in a specific style without training or finetuning the entire model. The adapter weights are typically only a tiny fraction of the pretrained model's which making them very portable. 🤗 Diffusers provides an easy-to-use `LoaderMixin` API to load adapter weights.
16+
17+
<Tip warning={true}>
18+
19+
🧪 The `LoaderMixins` are highly experimental and prone to future changes. To use private or [gated](https://huggingface.co/docs/hub/models-gated#gated-models) models, log-in with `huggingface-cli login`.
20+
21+
</Tip>
22+
23+
## UNet2DConditionLoadersMixin
24+
25+
[[autodoc]] loaders.UNet2DConditionLoadersMixin
26+
27+
## TextualInversionLoaderMixin
28+
29+
[[autodoc]] loaders.TextualInversionLoaderMixin
30+
31+
## StableDiffusionXLLoraLoaderMixin
32+
33+
[[autodoc]] loaders.StableDiffusionXLLoraLoaderMixin
34+
35+
## LoraLoaderMixin
36+
37+
[[autodoc]] loaders.LoraLoaderMixin
38+
39+
## FromSingleFileMixin
40+
41+
[[autodoc]] loaders.FromSingleFileMixin
42+
43+
## FromOriginalControlnetMixin
44+
45+
[[autodoc]] loaders.FromOriginalControlnetMixin
46+
47+
## FromOriginalVAEMixin
48+
49+
[[autodoc]] loaders.FromOriginalVAEMixin

0 commit comments

Comments
 (0)