Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Prompt with input image allowed? #269

Open
andstu opened this issue Dec 24, 2023 · 0 comments
Open

No Prompt with input image allowed? #269

andstu opened this issue Dec 24, 2023 · 0 comments

Comments

@andstu
Copy link

andstu commented Dec 24, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant