Skip to content

Issues in the docstrings for Kandinsky pipeline(s) #3693

@freespirit

Description

@freespirit

Describe the bug

I noticed a few issues with the docstrings in Kandinsky pipelines:

  1. Wrong model name in the pipeline_kandinsky.py example:
pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/Kandinsky-prior")

should be

pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/kandinsky-2-1-prior")
  1. The KandinskyPriorPipelineOutput's members were renamed in 32ea214 but the relevant docstrings throughout the Kandinsky pipelines were not. For example, the src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py has this docstring:
pipe_prior = ...
out = pipe_prior(prompt)
image_emb = out.images
zero_image_emb = out.zero_embeds

In addition to using the correct member names, I would suggest renaming the variables:

pipe_prior = ...
out = pipe_prior(prompt)
image_emb = out.image_embeds
negative_image_embeds = out.negative_image_embeds

Reproduction

from diffusers import KandinskyPipeline, KandinskyPriorPipeline
import torch

pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/Kandinsky-prior") # wrong model id
pipe_prior.to("cuda")

prompt = "red cat, 4k photo"
out = pipe_prior(prompt)
image_emb = out.images # wrong name
zero_image_emb = out.zero_embeds # wrong name

Logs

No response

System Info

latest commit: 3c0579b

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions