Skip to content

Commit 78ae5a2

Browse files
AbdullahAlfarajPrathik Rao
authored andcommitted
fix docs: change sample to images (huggingface#613)
the result of running the pipeline is stored in StableDiffusionPipelineOutput.images
1 parent f6d8eb9 commit 78ae5a2

File tree

1 file changed

+3
-3
lines changed
  • src/diffusers/pipelines/stable_diffusion

1 file changed

+3
-3
lines changed

src/diffusers/pipelines/stable_diffusion/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pipe = pipe.to("cuda")
6767

6868
prompt = "a photo of an astronaut riding a horse on mars"
6969
with autocast("cuda"):
70-
image = pipe(prompt).sample[0]
70+
image = pipe(prompt).images[0]
7171

7272
image.save("astronaut_rides_horse.png")
7373
```
@@ -89,7 +89,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
8989

9090
prompt = "a photo of an astronaut riding a horse on mars"
9191
with autocast("cuda"):
92-
image = pipe(prompt).sample[0]
92+
image = pipe(prompt).images[0]
9393

9494
image.save("astronaut_rides_horse.png")
9595
```
@@ -115,7 +115,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
115115

116116
prompt = "a photo of an astronaut riding a horse on mars"
117117
with autocast("cuda"):
118-
image = pipe(prompt).sample[0]
118+
image = pipe(prompt).images[0]
119119

120120
image.save("astronaut_rides_horse.png")
121121
```

0 commit comments

Comments
 (0)