Skip to content

Commit 10f4ecd

Browse files
authored
Fix the Kandinsky docstring examples (#3695)
- use the correct Prior hub model id - use the new names in KandinskyPriorPipelineOutput
1 parent de16f64 commit 10f4ecd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@
4141
>>> from diffusers import KandinskyPipeline, KandinskyPriorPipeline
4242
>>> import torch
4343
44-
>>> pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/Kandinsky-prior")
44+
>>> pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/Kandinsky-2-1-prior")
4545
>>> pipe_prior.to("cuda")
4646
4747
>>> prompt = "red cat, 4k photo"
4848
>>> out = pipe_prior(prompt)
49-
>>> image_emb = out.images
50-
>>> zero_image_emb = out.zero_embeds
49+
>>> image_emb = out.image_embeds
50+
>>> negative_image_emb = out.negative_image_embeds
5151
5252
>>> pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1")
5353
>>> pipe.to("cuda")
5454
5555
>>> image = pipe(
5656
... prompt,
5757
... image_embeds=image_emb,
58-
... negative_image_embeds=zero_image_emb,
58+
... negative_image_embeds=negative_image_emb,
5959
... height=768,
6060
... width=768,
6161
... num_inference_steps=100,

src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@
4545
4646
>>> prompt = "red cat, 4k photo"
4747
>>> out = pipe_prior(prompt)
48-
>>> image_emb = out.images
49-
>>> zero_image_emb = out.zero_embeds
48+
>>> image_emb = out.image_embeds
49+
>>> negative_image_emb = out.negative_image_embeds
5050
5151
>>> pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1")
5252
>>> pipe.to("cuda")
5353
5454
>>> image = pipe(
5555
... prompt,
5656
... image_embeds=image_emb,
57-
... negative_image_embeds=zero_image_emb,
57+
... negative_image_embeds=negative_image_emb,
5858
... height=768,
5959
... width=768,
6060
... num_inference_steps=100,

0 commit comments

Comments
 (0)