Jinkura commited on
Commit
00f80fe
1 Parent(s): b03a1ad

Updating example code in README.md

Browse files

According to this [issue](https://github.com/CompVis/stable-diffusion/issues/402) we should now use `.images` field instead of the `["sample"]` key.

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -57,7 +57,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
57
 
58
  prompt = "1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt"
59
  with autocast("cuda"):
60
- image = pipe(prompt, guidance_scale=6)["sample"][0]
61
 
62
  image.save("test.png")
63
  ```
 
57
 
58
  prompt = "1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt"
59
  with autocast("cuda"):
60
+ image = pipe(prompt, guidance_scale=6).images[0]
61
 
62
  image.save("test.png")
63
  ```