mirror of
https://github.com/huggingface/diffusers.git
synced 2026-06-16 00:35:12 +08:00
* part 2 of api fixes * move randn_tensor * add to toctree * apply feedback * more feedback
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
<!--Copyright 2023 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.
|
|
-->
|
|
|
|
# Pipelines
|
|
|
|
The [`DiffusionPipeline`] is the easiest way to load any pretrained diffusion pipeline from the [Hub](https://huggingface.co/models?library=diffusers) and use it for inference.
|
|
|
|
<Tip>
|
|
|
|
You shouldn't use the [`DiffusionPipeline`] class for training or finetuning a diffusion model. Individual
|
|
components (for example, [`UNetModel`] and [`UNetConditionModel`]) of diffusion pipelines are usually trained individually, so we suggest directly working with instead.
|
|
|
|
</Tip>
|
|
|
|
The pipeline type (for example [`StableDiffusionPipeline`]) of any diffusion pipeline loaded with [`~DiffusionPipeline.from_pretrained`] is automatically
|
|
detected and pipeline components are loaded and passed to the `__init__` function of the pipeline.
|
|
|
|
Any pipeline object can be saved locally with [`~DiffusionPipeline.save_pretrained`].
|
|
|
|
## DiffusionPipeline
|
|
|
|
[[autodoc]] DiffusionPipeline
|
|
- all
|
|
- __call__
|
|
- device
|
|
- to
|
|
- components
|