keras-io
keras-io copied to clipboard
Stable Diffusion protobuf incompatibility
https://keras.io/guides/keras_cv/generate_images_with_stable_diffusion/
Linux orin1 5.10.65-tegra #1 SMP PREEMPT Mon May 16 20:58:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux
After Installing (sudo pip3 install --upgrade keras-cv and sudo pip3 install --upgrade tensorflow) I receive the following error (note I received a different error after downgrading protobuf... see below) ... File "/home/orin/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, in new _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
orin@orin1:~/keras-cv$ sudo pip3 install protobuf==3.19.*
Collecting protobuf==3.19.*
Using cached protobuf-3.19.5-cp38-cp38-manylinux2014_aarch64.whl (913 kB)
Installing collected packages: protobuf
Attempting uninstall: protobuf
Found existing installation: protobuf 3.20.1
Uninstalling protobuf-3.20.1:
Successfully uninstalled protobuf-3.20.1
Successfully installed protobuf-3.19.5
orin@orin1:~/keras-cv$ python3 keras-cv-images.py
Traceback (most recent call last):
File "keras-cv-images.py", line 2, in
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates