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

Update stable_diffusion.mdx (#3310)

fixed import statement
This commit is contained in:
Umar
2023-05-03 10:53:14 -04:00
committed by GitHub
parent efc48da23b
commit 0ccad2ad2d

View File

@@ -153,7 +153,7 @@ def get_inputs(batch_size=1):
You'll also need a function that'll display each batch of images:
```python
from PIL import image
from PIL import Image
def image_grid(imgs, rows=2, cols=2):
@@ -268,4 +268,4 @@ In this tutorial, you learned how to optimize a [`DiffusionPipeline`] for comput
- Enable [xFormers](./optimization/xformers) memory efficient attention mechanism for faster speed and reduced memory consumption.
- Learn how in [PyTorch 2.0](./optimization/torch2.0), [`torch.compile`](https://pytorch.org/docs/stable/generated/torch.compile.html) can yield 2-9% faster inference speed.
- Many optimization techniques for inference are also included in this memory and speed [guide](./optimization/fp16), such as memory offloading.
- Many optimization techniques for inference are also included in this memory and speed [guide](./optimization/fp16), such as memory offloading.