1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

fix/doc: no import torch issue (#3923)

Ffix/doc: no import torch issue

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Aisuko
2023-07-03 20:28:42 +10:00
committed by GitHub
parent f911287cc9
commit b298484fd0

View File

@@ -52,6 +52,8 @@ pipeline = pipeline.to("cuda")
To make sure you can use the same image and improve on it, use a [`Generator`](https://pytorch.org/docs/stable/generated/torch.Generator.html) and set a seed for [reproducibility](./using-diffusers/reproducibility):
```python
import torch
generator = torch.Generator("cuda").manual_seed(0)
```