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
* Add copyright notice to relevant files and fix typos
* Set `timestep_spacing` parameter of `StableDiffusionXLPipeline`'s scheduler to `'trailing'`.
* Update `StableDiffusionXLPipeline.from_single_file` by including EulerAncestralDiscreteScheduler with `timestep_spacing="trailing"` param.
* Update model loading method in SDXL Turbo documentation
Copy file name to clipboardExpand all lines: docs/source/en/api/models/consistency_decoder_vae.md
+13-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,18 @@
1
+
<!--Copyright 2024 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
+
1
13
# Consistency Decoder
2
14
3
-
Consistency decoder can be used to decode the latents from the denoising UNet in the [`StableDiffusionPipeline`]. This decoder was introduced in the [DALL-E 3 technical report](https://openai.com/dall-e-3).
15
+
Consistency decoder can be used to decode the latents from the denoising UNet in the [`StableDiffusionPipeline`]. This decoder was introduced in the [DALL-E 3 technical report](https://openai.com/dall-e-3).
4
16
5
17
The original codebase can be found at [openai/consistencydecoder](https://github.com/openai/consistencydecoder).
Copy file name to clipboardExpand all lines: docs/source/en/api/pipelines/stable_diffusion/sdxl_turbo.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ The abstract from the paper is:
21
21
## Tips
22
22
23
23
- SDXL Turbo uses the exact same architecture as [SDXL](./stable_diffusion_xl), which means it also has the same API. Please refer to the [SDXL](./stable_diffusion_xl) API reference for more details.
24
-
- SDXL Turbo should disable guidance scale by setting `guidance_scale=0.0`
24
+
- SDXL Turbo should disable guidance scale by setting `guidance_scale=0.0`.
25
25
- SDXL Turbo should use `timestep_spacing='trailing'` for the scheduler and use between 1 and 4 steps.
26
26
- SDXL Turbo has been trained to generate images of size 512x512.
27
27
- SDXL Turbo is open-access, but not open-source meaning that one might have to buy a model license in order to use it for commercial applications. Make sure to read the [official model card](https://huggingface.co/stabilityai/sdxl-turbo) to learn more.
Copy file name to clipboardExpand all lines: docs/source/en/using-diffusers/sdxl_turbo.md
+11-9
Original file line number
Diff line number
Diff line change
@@ -31,29 +31,31 @@ Before you begin, make sure you have the following libraries installed:
31
31
Model weights may be stored in separate subfolders on the Hub or locally, in which case, you should use the [`~StableDiffusionXLPipeline.from_pretrained`] method:
32
32
33
33
```py
34
-
from diffusers import AutoPipelineForText2Image, AutoPipelineForImage2Image
You can also use the [`~StableDiffusionXLPipeline.from_single_file`] method to load a model checkpoint stored in a single file format (`.ckpt` or `.safetensors`) from the Hub or locally:
41
+
You can also use the [`~StableDiffusionXLPipeline.from_single_file`] method to load a model checkpoint stored in a single file format (`.ckpt` or `.safetensors`) from the Hub or locally. For this loading method, you need to set `timestep_spacing="trailing"` (feel free to experiment with the other scheduler config values to get better results):
42
42
43
43
```py
44
-
from diffusers import StableDiffusionXLPipeline
44
+
from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
For text-to-image, pass a text prompt. By default, SDXL Turbo generates a 512x512 image, and that resolution gives the best results. You can try setting the `height` and `width` parameters to 768x768 or 1024x1024, but you should expect quality degradations when doing so.
55
57
56
-
Make sure to set `guidance_scale` to 0.0 to disable, as the model was trained without it. A single inference step is enough to generate high quality images.
58
+
Make sure to set `guidance_scale` to 0.0 to disable, as the model was trained without it. A single inference step is enough to generate high quality images.
57
59
Increasing the number of steps to 2, 3 or 4 should improve image quality.
58
60
59
61
```py
@@ -75,7 +77,7 @@ image
75
77
76
78
## Image-to-image
77
79
78
-
For image-to-image generation, make sure that `num_inference_steps * strength` is larger or equal to 1.
80
+
For image-to-image generation, make sure that `num_inference_steps * strength` is larger or equal to 1.
79
81
The image-to-image pipeline will run for `int(num_inference_steps * strength)` steps, e.g. `0.5 * 2.0 = 1` step in
80
82
our example below.
81
83
@@ -84,14 +86,14 @@ from diffusers import AutoPipelineForImage2Image
84
86
from diffusers.utils import load_image, make_image_grid
85
87
86
88
# use from_pipe to avoid consuming additional memory when loading a checkpoint
0 commit comments