Skip to content

No Prompt with input image allowed? #269

@andstu

Description

@andstu

Are you intended to be able to pass an input image without a prompt for the generate api?

        if (prompt is None) and (init_image is None):
            raise ValueError("prompt and/or init_image must be provided")

This error message implies that you should be able to. But later, it tries to iterate over the prompt object.

for p in prompt:
            if isinstance(p, str):
                p = generation.Prompt(text=p)
            elif not isinstance(p, generation.Prompt):
                raise TypeError("prompt must be a string or generation.Prompt object")
            prompts.append(p)

So when I don't pass a prompt in I get an error.

  File "/opt/homebrew/Caskroom/miniconda/base/envs/tile-texture/lib/python3.11/site-packages/stability_sdk/client.py", line 226, in generate
    for p in prompt:
TypeError: 'NoneType' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions