bmaltais / kohya_ss

Apache License 2.0
9.57k stars 1.23k forks source link

Finetunning Issue with meta_lat.json in FLUX Kohya. #2890

Open davizca opened 2 weeks ago

davizca commented 2 weeks ago

Hello!

Seems that I was able to do the meta_cap.json but the meta_lat.json is something I can't get making it working properly.

"Traceback (most recent call last): File "D:\AI\Kohya\kohya_ss\sd-scripts\finetune\prepare_buckets_latents.py", line 286, in main(args) File "D:\AI\Kohya\kohya_ss\sd-scripts\finetune\prepare_buckets_latents.py", line 89, in main vae = model_util.load_vae(args.model_name_or_path, weight_dtype) File "D:\AI\kohya_ss\sd-scripts\library\model_util.py", line 1304, in load_vae converted_vae_checkpoint = convert_ldm_vae_checkpoint(vae_sd, vae_config) File "D:\AI\kohya_ss\sd-scripts\library\model_util.py", line 415, in convert_ldm_vae_checkpoint new_checkpoint["encoder.conv_in.weight"] = vae_state_dict["encoder.conv_in.weight"]" KeyError: 'encoder.conv_in.weight'"

"File "D:\AI\Kohya\kohya_ss\sd-scripts\flux_train.py", line 994, in train(args) File "D:\AI\Kohya\kohya_ss\sd-scripts\flux_train.py", line 129, in train train_dataset_group = config_util.generate_dataset_group_by_blueprint(blueprint.dataset_group) File "D:\AI\Kohya\kohya_ss\sd-scripts\library\config_util.py", line 485, in generate_dataset_group_by_blueprint dataset = dataset_klass(subsets=subsets, **asdict(dataset_blueprint.params)) File "D:\AI\Kohya\kohya_ss\sd-scripts\library\train_util.py", line 1981, in init raise ValueError(f"no metadata / メタデータファイルがありません: {subset.metadata_file}") ValueError: no metadata / メタデータファイルがありません: /meta_lat.json"

This is the problem, any helping hand? Thanks!

b-fission commented 2 weeks ago

Are your images organized inside subfolders like they would be for LoRA/Dreambooth training? Finetuning is a little different by default, and expects all your images and captions to be in the image folder itself; no subdirectories.

davizca commented 2 weeks ago

Are your images organized inside subfolders like they would be for LoRA/Dreambooth training? Finetuning is a little different by default, and expects all your images and captions to be in the image folder itself; no subdirectories.

Will check when back at home but I think they were on dataset/images/subfolder and all in the subfolder.

Thanks for the answer!

Lorian95 commented 1 week ago

I have the same issue, the meta_lat.json is not generating.