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/using-diffusers/loading.md
+5-28Lines changed: 5 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,25 +10,17 @@ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o
10
10
specific language governing permissions and limitations under the License.
11
11
-->
12
12
13
-
# Load pipelines
14
-
15
13
[[open-in-colab]]
16
14
17
-
Diffusion systems consist of multiple components like parameterized models and schedulers that interact in complex ways. That is why we designed the [`DiffusionPipeline`] to wrap the complexity of the entire diffusion system into an easy-to-use API. At the same time, the [`DiffusionPipeline`] is entirely customizable so you can modify each component to build a diffusion system for your use case.
18
-
19
-
This guide will show you how to load:
15
+
# DiffusionPipeline
20
16
21
-
- pipelines from the Hub and locally
22
-
- different components into a pipeline
23
-
- multiple pipelines without increasing memory usage
24
-
- checkpoint variants such as different floating point types or non-exponential mean averaged (EMA) weights
17
+
Diffusion models consists of multiple components like UNets or diffusion transformers (DiTs), text encoders, variational autoencoders (VAEs), and schedulers. The [`DiffusionPipeline`] wraps all of these components into a single easy-to-use API without giving up the flexibility to modify it's components.
25
18
26
-
## Load a pipeline
19
+
This guide will show you how to load a [`DiffusionPipeline`].
27
20
28
-
> [!TIP]
29
-
> Skip to the [DiffusionPipeline explained](#diffusionpipeline-explained) section if you're interested in an explanation about how the [`DiffusionPipeline`] class works.
21
+
## Loading a pipeline
30
22
31
-
There are two ways to load a pipeline for a task:
23
+
There are two ways to load a pipeline.
32
24
33
25
1. Load the generic [`DiffusionPipeline`] class and allow it to automatically detect the correct pipeline class from the checkpoint.
34
26
2. Load a specific pipeline class for a specific task.
You can customize the data types for individual sub-models by passing a dictionary to the `torch_dtype` parameter. This allows you to load different components of a pipeline in different floating point precisions. For instance, if you want to load the transformer with `torch.bfloat16` and all other components with `torch.float16`, you can pass a dictionary mapping:
0 commit comments