1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix style rendering (#3433)

* Fix style rendering.

* Fix typo
This commit is contained in:
Pedro Cuenca
2023-05-15 11:02:34 +02:00
committed by GitHub
parent bdefabd1a8
commit 7a32b6beeb
2 changed files with 4 additions and 1 deletions

View File

@@ -60,8 +60,10 @@ image = pipe(prompt).images[0]
```
<Tip warning={true}>
It is strongly discouraged to make use of [`torch.autocast`](https://pytorch.org/docs/stable/amp.html#torch.autocast) in any of the pipelines as it can lead to black images and is always slower than using pure
float16 precision.
</Tip>
## Sliced attention for additional memory savings

View File

@@ -18,6 +18,7 @@ Starting from version `0.13.0`, Diffusers supports the latest optimization from
## Installation
To benefit from the accelerated attention implementation and `torch.compile()`, you just need to install the latest versions of PyTorch 2.0 from pip, and make sure you are on diffusers 0.13.0 or later. As explained below, diffusers automatically uses the optimized attention processor ([`AttnProcessor2_0`](https://github.com/huggingface/diffusers/blob/1a5797c6d4491a879ea5285c4efc377664e0332d/src/diffusers/models/attention_processor.py#L798)) (but not `torch.compile()`)
when PyTorch 2.0 is available.
@@ -153,7 +154,7 @@ for _ in range(3):
image = pipe(prompt=prompt, image=init_image).images[0]
```
#### Stable Diffusion - inpatining
#### Stable Diffusion - inpainting
```python
from diffusers import StableDiffusionInpaintPipeline