Text-to-Image
Diffusers
Safetensors
StableDiffusionPipeline
stable-diffusion
Inference Endpoints
simon-mo commited on
Commit
f5e69f3
1 Parent(s): 07753ec

Update README.md code to import `torch`

Browse files

The sample code snippet doesn't run by itself because `torch` would be undefined in
```python
StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
```

Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -46,6 +46,7 @@ Running the pipeline (if you don't swap the scheduler it will run with the defau
46
 
47
  ```python
48
  from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
 
49
 
50
  model_id = "stabilityai/stable-diffusion-2"
51
 
 
46
 
47
  ```python
48
  from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
49
+ import torch
50
 
51
  model_id = "stabilityai/stable-diffusion-2"
52