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:
@@ -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)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user