python scripts/convert_lora_safetensor_to_diffusers.py --base_model_path /usr/AI/training/models/diffusers_model --checkpoint_path /usr/AI/training/models/model_genie_lora/pytorch_lora_weights.safetensors --dump_path /usr/AI/training/models/model_genie_lora_diffusers
Loading pipeline components…: 0%| | 0/7 [00:00<?, ?it/s]An error occurred while trying to fetch /usr/AI/training/models/diffusers_model/unet: Error no file named diffusion_pytorch_model.safetensors found in directory /usr/AI/training/models/diffusers_model/unet.
Defaulting to unsafe serialization. Pass allow_pickle=False
to raise an error instead.
Loading pipeline components…: 14%|████████▌ | 1/7 [00:20<02:05, 20.93s/it]/usr/local/python3.10.11/lib/python3.10/site-packages/transformers/models/clip/feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
warnings.warn(
Loading pipeline components…: 57%|██████████████████████████████████▎ | 4/7 [00:21<00:12, 4.03s/it]An error occurred while trying to fetch /usr/AI/training/models/diffusers_model/vae: Error no file named diffusion_pytorch_model.safetensors found in directory /usr/AI/training/models/diffusers_model/vae.
Defaulting to unsafe serialization. Pass allow_pickle=False
to raise an error instead.
Loading pipeline components…: 100%|████████████████████████████████████████████████████████████| 7/7 [00:23<00:00, 3.35s/it]
Traceback (most recent call last):
File “/usr/AI/diffusers/scripts/convert_lora_safetensor_to_diffusers.py”, line 55, in convert
curr_layer = curr_layer.getattr(temp_name)
File “/usr/AI/diffusers/src/diffusers/models/modeling_utils.py”, line 173, in getattr
return super().getattr(name)
File “/usr/local/python3.10.11/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1931, in getattr
raise AttributeError(
AttributeError: ‘UNet2DConditionModel’ object has no attribute ‘unet’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/AI/diffusers/scripts/convert_lora_safetensor_to_diffusers.py”, line 125, in
pipe = convert(base_model_path, checkpoint_path, lora_prefix_unet, lora_prefix_text_encoder, alpha)
File “/usr/AI/diffusers/scripts/convert_lora_safetensor_to_diffusers.py”, line 62, in convert
temp_name += “_” + layer_infos.pop(0)
IndexError: pop from empty list