hollowstrawberry / kohya-colab

Accessible Google Colab notebooks for Stable Diffusion Lora training, based on the work of kohya-ss and Linaqruf
GNU General Public License v3.0
561 stars 80 forks source link

ImportError during Tagging the Image #81

Closed yalvih closed 4 months ago

yalvih commented 5 months ago

I currently working on preprocesing some dataset for my LoRA and I ran into the problem and found this error in my terminal during "Tagging the Image section":

env: PYTHONPATH=/env/python

πŸšΆβ€β™‚οΈ Launching program...

env: PYTHONPATH=/content/kohya-trainer
Traceback (most recent call last):
  File "/content/kohya-trainer/finetune/tag_images_by_wd14_tagger.py", line 10, in <module>
    from tensorflow.keras.models import load_model
  File "/usr/local/lib/python3.10/dist-packages/keras/api/_v2/keras/__init__.py", line 3, in <module>
    from keras.api._v2.keras import __internal__
  File "/usr/local/lib/python3.10/dist-packages/keras/api/_v2/keras/__init__.py", line 3, in <module>
    from keras.api._v2.keras import __internal__
  File "/usr/local/lib/python3.10/dist-packages/keras/api/_v2/keras/__internal__/__init__.py", line 3, in <module>
    from keras.api._v2.keras.__internal__ import backend
  File "/usr/local/lib/python3.10/dist-packages/keras/api/_v2/keras/__internal__/backend/__init__.py", line 3, in <module>
    from keras.src.backend import _initialize_variables as initialize_variables
ImportError: cannot import name '_initialize_variables' from 'keras.src.backend' (/usr/local/lib/python3.10/dist-packages/keras/src/backend/__init__.py)

Expectations:

The program run the Tags the Image

Is this another problem from module update? Thank You.

hollowstrawberry commented 4 months ago

Cannot reproduce, might have been fixed by now.