Skip to content

Fix style rendering #3433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/en/optimization/fp16.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/source/en/optimization/torch2.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down