finetune-sd icon indicating copy to clipboard operation
finetune-sd copied to clipboard

info = metadata.get(name) AttributeError: 'NoneType' object has no attribute 'get'

Open picard314 opened this issue 2 years ago • 0 comments

Hi Harry Wang

Thank you for your attention.

I am writing because when I run

lora_add runwayml/stable-diffusion-v1-5 ./models/dreambooth/3d-avatar/final_lora.safetensors ./output_merged.ckpt 0.7 --mode upl-ckpt-v2

error occurs and says

###############################

Lora Add, mode upl-ckpt-v2 You will be using output_merged as the token in A1111 webui. Make sure output_merged is unique enough token. text_config_dict is provided which will be used to initialize CLIPTextConfig. The value text_config["id2label"] will be overriden. Traceback (most recent call last): File "/home/rtcai3/anaconda3/envs/lora/bin/lora_add", line 8, in sys.exit(main()) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/lora_diffusion/cli_lora_add.py", line 187, in main fire.Fire(add) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/lora_diffusion/cli_lora_add.py", line 142, in add tok_dict = patch_pipe(loaded_pipeline, path_2, patch_ti=False) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/lora_diffusion/lora.py", line 1012, in patch_pipe monkeypatch_or_replace_safeloras(pipe, safeloras) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/lora_diffusion/lora.py", line 800, in monkeypatch_or_replace_safeloras loras = parse_safeloras(safeloras) File "/home/rtcai3/anaconda3/envs/lora/lib/python3.9/site-packages/lora_diffusion/lora.py", line 562, in parse_safeloras info = metadata.get(name) AttributeError: 'NoneType' object has no attribute 'get'

###############################

I've already prepared "stable-diffusion-v1-5" (downloaded from hugging face), as well as the safetensors (converted by convert-to-safetensors.py; converted from pkl or bin which was trained using your codes).

Could you please look into this issue and I am looking forward to hearing from you. Thanks again.

Best, Picard314

picard314 avatar May 24 '23 02:05 picard314