Linaqruf / kohya-trainer

Adapted from https://note.com/kohya_ss/n/nbf7ce8d80f29 for easier cloning
Apache License 2.0
1.83k stars 300 forks source link

Wrong Default Parameters About pretrained_model_name_or_path #233

Open Carzit opened 1 year ago

Carzit commented 1 year ago

emmm, I started to use your project 3 months ago. And I recently came across this problem.

In the step 2.1-'Download Available Model', if I choose "AnyLoRA", it will download the resource through "https://huggingface.co/Lykon/AnyLoRA/resolve/main/AnyLoRA_noVae_fp16-pruned.ckpt". That's a .ckpt file.

However, in the step 5.1- 'Model Config', the default parameters 'pretrained_model_name_or_path' is "/content/pretrained_model/AnyLoRA.safetensors". That apparently points to a .safetensor file.

Anylora is a good model, of course. And many lora maker (include me) who uses your project just think the default setting is good enough so they will not change the pretained model parameter. Then the error occured:

load Diffusers pretrained models model is not found as a file or in Hugging Face, perhaps file name is wrong? / 指定したモデル名のファイル、またはHugging Faceのモデルが見つかりません。ファイル名が誤っているかもしれません: /content/pretrained_model/AnyLoRA.safetensor

So I chose to modify the config file(/content/LoRA/config/config_file.toml), and it did work. Maybe that's a small bug about the default parameters. If it is, i hope you can just fix the default parameter settings about it. (●'◡'●)

Linaqruf commented 1 year ago

Thank you for this, i changed the anylora version to safetensors in the latest commit https://github.com/Linaqruf/kohya-trainer/commit/001fd537a5259618d79303d0cb70274c2d669c2b