luxiaolili / IDM-VTON-train

53 stars 3 forks source link

fail to load model #4

Closed Nomination-NRB closed 4 months ago

Nomination-NRB commented 4 months ago
# line 248
pretrain = os.path.join(args.pretrained_model_name_or_path, 'unet')
load_model_with_zeroed_mismatched_keys(unet, os.path.join(pretrain, 'diffusion_pytorch_model.safetensors'))

The diffusion_pytorch_model.safetensors file does not exist in the unet folder, only in the unet_encoder folder, do I need to change it to this:

pretrain = os.path.join(args.pretrained_model_name_or_path, 'unet_encoder')
load_model_with_zeroed_mismatched_keys(unet, os.path.join(pretrain, 'diffusion_pytorch_model.safetensors'))
luxiaolili commented 4 months ago
# line 248
pretrain = os.path.join(args.pretrained_model_name_or_path, 'unet')
load_model_with_zeroed_mismatched_keys(unet, os.path.join(pretrain, 'diffusion_pytorch_model.safetensors'))

The diffusion_pytorch_model.safetensors file does not exist in the unet folder, only in the unet_encoder folder, do I need to change it to this:

pretrain = os.path.join(args.pretrained_model_name_or_path, 'unet_encoder')
load_model_with_zeroed_mismatched_keys(unet, os.path.join(pretrain, 'diffusion_pytorch_model.safetensors'))

sorry, I fix it, pretrain = os.path.join(args.inpainting_model_path, 'unet')

Nomination-NRB commented 4 months ago
# line 248
pretrain = os.path.join(args.pretrained_model_name_or_path, 'unet')
load_model_with_zeroed_mismatched_keys(unet, os.path.join(pretrain, 'diffusion_pytorch_model.safetensors'))

The diffusion_pytorch_model.safetensors file does not exist in the unet folder, only in the unet_encoder folder, do I need to change it to this:

pretrain = os.path.join(args.pretrained_model_name_or_path, 'unet_encoder')
load_model_with_zeroed_mismatched_keys(unet, os.path.join(pretrain, 'diffusion_pytorch_model.safetensors'))

sorry, I fix it, pretrain = os.path.join(args.inpainting_model_path, 'unet')

thanks