Stability-AI / stability-sdk

SDK for interacting with stability.ai APIs (e.g. stable diffusion inference)
https://platform.stability.ai/
MIT License
2.43k stars 339 forks source link

ModuleNotFoundError: No module named 'stability_sdk.interfaces.gooseai' #140

Closed cdavietei closed 1 year ago

cdavietei commented 1 year ago

I tried setting up a python SDK client following this guide: https://platform.stability.ai/docs/getting-started/python-sdk on my macbook, but got the following error when I tried to run the test prompt: python3 -m stability_sdk.client -W 512 -H 512 "A stunning house."

Traceback (most recent call last):
  File "/Users/ctei/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/ctei/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/ctei/Documents/Workspace/PhotoAi/stability-test/stability-sdk/src/stability_sdk/client.py", line 28, in <module>
    import stability_sdk.interfaces.gooseai.generation.generation_pb2 as generation
ModuleNotFoundError: No module named 'stability_sdk.interfaces.gooseai'

I believe that I'm correctly in the pyenv since my terminal prompt says (pyenv) (base). I can't seem to find any other people that ran into this issue, and it looks like a problem with the grpc service generation.

Has anyone run into this or are there any tips for debugging this?

Thanks in advance!

Chris

System details: Python 3.9.13 MacOS 12.3.1

cdavietei commented 1 year ago

I figured it out. There's git submodules in the this repo, so a simple git clone was not enough to get all the files I had to do the following step to get the submodules as well.

git submodule update --init --recursive

Once I did this I was able to follow the remaining steps.