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

error when start tagging images #91

Closed kaekitsune closed 4 months ago

kaekitsune commented 4 months ago

🚶‍♂️ Launching program...

env: PYTHONPATH=/content/kohya-trainer CUDA backend failed to initialize: Found CUDA version 12010, but JAX was built against version 12020, which is newer. The copy of CUDA that is installed must be at least as new as the version against which JAX was built. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.) downloading wd14 tagger model from hf_hub. id: SmilingWolf/wd-v1-4-swinv2-tagger-v2 Downloading (…)"keras_metadata.pb";: 100% 448k/448k [00:00<00:00, 62.4MB/s] Downloading (…)"saved_model.pb";: 100% 37.6M/37.6M [00:00<00:00, 292MB/s] Downloading (…)"selected_tags.csv";: 100% 254k/254k [00:00<00:00, 1.02MB/s] Downloading (…)ata-00000-of-00001";: 100% 385M/385M [00:01<00:00, 272MB/s] Downloading (…)"variables.index";: 100% 24.2k/24.2k [00:00<00:00, 57.7MB/s] found 98 images. loading model and labels ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /content/kohya-trainer/finetune/tag_images_by_wd14_tagger.py:206 in │ │ │ │ 203 if args.caption_extention is not None: │ │ 204 │ args.caption_extension = args.caption_extention │ │ 205 │ │ ❱ 206 main(args) │ │ 207 │ │ │ │ /content/kohya-trainer/finetune/tag_images_by_wd14_tagger.py:96 in main │ │ │ │ 93 print(f"found {len(image_paths)} images.") │ │ 94 │ │ 95 print("loading model and labels") │ │ ❱ 96 model = load_model(args.model_dir) │ │ 97 │ │ 98 # label_names = pd.read_csv("2022_0000_0899_6549/selected_tags.csv") │ │ 99 # 依存ライブラリを増やしたくないので自力で読むよ │ │ │ │ /usr/local/lib/python3.10/dist-packages/keras/src/saving/saving_api.py:191 in load_model │ │ │ │ 188 │ │ │ "zip file." │ │ 189 │ │ ) │ │ 190 │ else: │ │ ❱ 191 │ │ raise ValueError( │ │ 192 │ │ │ f"File format not supported: filepath={filepath}. " │ │ 193 │ │ │ "Keras 3 only supports V3 .keras files and " │ │ 194 │ │ │ "legacy H5 format files (.h5 extension). " │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: File format not supported: filepath=/content. Keras 3 only supports V3 .keras files and legacy H5 format files (.h5 extension). Note that the legacy SavedModel format is not supported by load_model() in Keras 3. In order to reload a TensorFlow SavedModel as an inference-only layer in Keras 3, use keras.layers.TFSMLayer(/content, call_endpoint='serving_default') (note that your call_endpoint might have a different name).

hugo-k-m commented 4 months ago

Same here.

Ope325 commented 4 months ago

Same. Is there any replacement?

TheRyukenOmega16 commented 4 months ago

I have the same problem too, I hope they fix it soon.

Sin título

hollowstrawberry commented 4 months ago

Should be fixed. I also cleaned up the dependencies so the tagger should install really quickly now instead of taking several minutes. Let me know how it goes.