Closed innat closed 6 months ago
I was able to install all these packages in individual cell in colab, here is the Gist https://colab.sandbox.google.com/gist/sachinprasadhs/2c9a60d3e51bc986c37999c222675e87/2376.ipynb
Not exactly. Inspect the first post, the packages did install but import error for keras-cv.
I have encountered the same issue. Although the Keras packages appear to be installed, I'm facing difficulties importing the modules. For instance, I encountered this error:
ModuleNotFoundError
Traceback (most recent call last)
[<ipython-input-2-1a02c2e511a0>](https://localhost:8080/#) in <cell line: 10>()
8 import tensorflow as tf
9 import tensorflow.experimental.numpy as tnp
---> 10 from keras_cv.models.stable_diffusion.clip_tokenizer import SimpleTokenizer
11 from keras_cv.models.stable_diffusion.diffusion_model import DiffusionModel
12 from keras_cv.models.stable_diffusion.image_encoder import ImageEncoder
ModuleNotFoundError: No module named 'keras_cv.models.stable_diffusion.clip_tokenizer
I am trying to fix it in #2394. This isn't an issue on colab side.
I was able to install all these packages in individual cell in colab, here is the Gist https://colab.sandbox.google.com/gist/sachinprasadhs/2c9a60d3e51bc986c37999c222675e87/2376.ipynb
Installation should work fine. import keras_cv
will fail.
Your colab already has a keras version installed, and when you reinstall a different version - you might get this error. Please restart session
and then do import keras
- that should work.
The failure comes from import keras_cv
and keras_nlp
is not installed.
I have encountered the same issue. Although the Keras packages appear to be installed, I'm facing difficulties importing the modules. For instance, I encountered this error:
ModuleNotFoundError Traceback (most recent call last) [<ipython-input-2-1a02c2e511a0>](https://localhost:8080/#) in <cell line: 10>() 8 import tensorflow as tf 9 import tensorflow.experimental.numpy as tnp ---> 10 from keras_cv.models.stable_diffusion.clip_tokenizer import SimpleTokenizer 11 from keras_cv.models.stable_diffusion.diffusion_model import DiffusionModel 12 from keras_cv.models.stable_diffusion.image_encoder import ImageEncoder ModuleNotFoundError: No module named 'keras_cv.models.stable_diffusion.clip_tokenizer
Try using src in between keras_cv and models while importing
from keras_cv.src.models.stable_diffusion.clip_tokenizer import SimpleTokenizer
from keras_cv.src.models.stable_diffusion.diffusion_model import DiffusionModel
from keras_cv.src.models.stable_diffusion.image_encoder import ImageEncoder
Tried to install keras-cv in colab with latest packages but got the following issue. However, this might be issue with colab and not keras-cv - not sure!!