xiezhy6 / GP-VTON

Official Implementation for CVPR2023 paper "GP-VTON: Towards General Purpose Virtual Try-on via Collaborative Local-Flow Global-Parsing Learning"
475 stars 82 forks source link

trying to find a way to run the dresscode 1024 (without train only generate image with cloth) #64

Open MosaabRkia opened 11 months ago

MosaabRkia commented 11 months ago

when i ran this command set CUDA_LAUNCH_BLOCKING=1 && python test_warping.py ^ --name test_lfgp_dresscode_unpaired_1024_230910 ^ --PBAFN_warp_checkpoint D:/Downloads/GP-VTON/checkpoints/gp-vton_partflow_dresscode_lrarms_resume_1105/PBAFN_warp_epoch_051.pth ^ --resize_or_crop None --verbose --tf_log ^ --dataset dresscode --resolution 1024 ^ --batchSize 1 --num_gpus 1 --label_nc 8 --launcher pytorch ^ --dataroot Datasets/DressCode_1024 ^ --image_pairs_txt test_pairs_unpaired_230729.txt

and after making sure that i have all of those in right place
getting long log (im trying to use one gpu nvidia gtx 1080  8gb))

_____logs____

(gp-vton) D:\Downloads\GP-VTON>    set CUDA_LAUNCH_BLOCKING=1 && python test_warping.py ^

More? --name test_lfgp_dresscode_unpaired_1024_230910 ^ More? --PBAFN_warp_checkpoint D:/Downloads/GP-VTON/checkpoints/gp-vton_partflow_dresscode_lrarms_resume_1105/PBAFN_warp_epoch_051.pth ^ More? --resize_or_crop None --verbose --tf_log ^ More? --dataset dresscode --resolution 1024 ^ More? --batchSize 1 --num_gpus 1 --label_nc 8 --launcher pytorch ^ More? --dataroot Datasets/DressCode_1024 ^ More? --image_pairs_txt test_pairs_unpaired_230729.txt ------------ Options ------------- CPM_D_checkpoint: None CPM_checkpoint: None PBAFN_gen_checkpoint: None PBAFN_warp_checkpoint: D:/Downloads/GP-VTON/checkpoints/gp-vton_partflow_dresscode_lrarms_resume_1105/PBAFN_warp_epoch_051.pth PFAFN_gen_checkpoint: None PFAFN_warp_checkpoint: None add_mask_tvloss: False batchSize: 1 beta1: 0.5 checkpoints_dir: ./checkpoints continue_train: False data_type: 32 dataroot: Datasets/DressCode_1024 dataset: dresscode debug: False debug_test: False debug_train: False display_freq: 100 display_freq_eval: 100 display_winsize: 512 fineSize: 512 first_order_smooth_weight: 0.01 gpu_ids: [0] image_pairs_txt: test_pairs_unpaired_230729.txt image_pairs_txt_eval: image_test_pairs_txt: input_nc: 3 isTrain: True label_nc: 8 lambda_feat: 10.0 launcher: pytorch loadSize: 512 load_pretrain: local_rank: 0 loss_ce: 1 loss_gan: 1 lr: 5e-05 lr_D: 5e-05 mask_epoch: -1 max_dataset_size: inf nThreads: 1 n_blocks_global: 4 n_blocks_local: 3 n_downsample_global: 4 n_layers_D: 3 n_local_enhancers: 1 name: test_lfgp_dresscode_unpaired_1024_230910 ndf: 64 netG: global ngf: 64 niter: 50 niter_decay: 50 niter_fix_global: 0 no_dynamic_mask: False no_flip: False no_ganFeat_loss: False no_html: False no_lsgan: False no_vgg_loss: False norm: instance num_D: 2 num_gpus: 1 output_nc: 3 phase: train pool_size: 0 pretrain_checkpoint_D: None print_freq: 100 repeat_num: 6 resize_or_crop: None resolution: 1024 save_epoch_freq: 20 save_latest_freq: 1000 serial_batches: False squaretv_weight: 1 test_flip: False tf_log: True tv_weight: 0.1 use_dropout: False use_preserve_mask_refine: False verbose: True warproot: which_epoch: latest write_loss_frep: 100 write_loss_frep_eval: 100 -------------- End ---------------- ------------ Options ------------- CPM_D_checkpoint: None CPM_checkpoint: None PBAFN_gen_checkpoint: None PBAFN_warp_checkpoint: D:/Downloads/GP-VTON/checkpoints/gp-vton_partflow_dresscode_lrarms_resume_1105/PBAFN_warp_epoch_051.pth PFAFN_gen_checkpoint: None PFAFN_warp_checkpoint: None add_mask_tvloss: False batchSize: 1 beta1: 0.5 checkpoints_dir: ./checkpoints continue_train: False data_type: 32 dataroot: Datasets/DressCode_1024 dataset: dresscode debug: False debug_test: False debug_train: False display_freq: 100 display_freq_eval: 100 display_winsize: 512 fineSize: 512 first_order_smooth_weight: 0.01 gpu_ids: [0] image_pairs_txt: test_pairs_unpaired_230729.txt image_pairs_txt_eval: image_test_pairs_txt: input_nc: 3 isTrain: True label_nc: 8 lambda_feat: 10.0 launcher: pytorch loadSize: 512 load_pretrain: local_rank: 0 loss_ce: 1 loss_gan: 1 lr: 5e-05 lr_D: 5e-05 mask_epoch: -1 max_dataset_size: inf nThreads: 1 n_blocks_global: 4 n_blocks_local: 3 n_downsample_global: 4 n_layers_D: 3 n_local_enhancers: 1 name: test_lfgp_dresscode_unpaired_1024_230910 ndf: 64 netG: global ngf: 64 niter: 50 niter_decay: 50 niter_fix_global: 0 no_dynamic_mask: False no_flip: False no_ganFeat_loss: False no_html: False no_lsgan: False no_vgg_loss: False norm: instance num_D: 2 num_gpus: 1 output_nc: 3 phase: train pool_size: 0 pretrain_checkpoint_D: None print_freq: 100 repeat_num: 6 resize_or_crop: None resolution: 1024 save_epoch_freq: 20 save_latest_freq: 1000 serial_batches: False squaretv_weight: 1 test_flip: False tf_log: True tv_weight: 0.1 use_dropout: False use_preserve_mask_refine: False verbose: True warproot: which_epoch: latest write_loss_frep: 100 write_loss_frep_eval: 100 -------------- End ------------------ ------------ Options ------------- CPM_D_checkpoint: None CPM_checkpoint: None PBAFN_gen_checkpoint: None PBAFN_warp_checkpoint: D:/Downloads/GP-VTON/checkpoints/gp-vton_partflow_dresscode_lrarms_resume_1105/PBAFN_warp_epoch_051.pth PFAFN_gen_checkpoint: None PFAFN_warp_checkpoint: None add_mask_tvloss: False batchSize: 1 beta1: 0.5 checkpoints_dir: ./checkpoints continue_train: False data_type: 32 dataroot: Datasets/DressCode_1024 dataset: dresscode debug: False debug_test: False debug_train: False display_freq: 100 display_freq_eval: 100 display_winsize: 512 fineSize: 512 first_order_smooth_weight: 0.01 gpu_ids: [0] image_pairs_txt: test_pairs_unpaired_230729.txt image_pairs_txt_eval: image_test_pairs_txt: input_nc: 3 isTrain: True label_nc: 8 lambda_feat: 10.0 launcher: pytorch loadSize: 512 load_pretrain: local_rank: 0 loss_ce: 1 loss_gan: 1 lr: 5e-05 lr_D: 5e-05 mask_epoch: -1 max_dataset_size: inf nThreads: 1 n_blocks_global: 4 n_blocks_local: 3 n_downsample_global: 4 n_layers_D: 3 n_local_enhancers: 1 name: test_lfgp_dresscode_unpaired_1024_230910 ndf: 64 netG: global ngf: 64 niter: 50 niter_decay: 50 niter_fix_global: 0 no_dynamic_mask: False no_flip: False no_ganFeat_loss: False no_html: False no_lsgan: False no_vgg_loss: False norm: instance num_D: 2 num_gpus: 1 output_nc: 3 phase: train pool_size: 0 pretrain_checkpoint_D: None print_freq: 100 repeat_num: 6 resize_or_crop: None resolution: 1024 save_epoch_freq: 20 save_latest_freq: 1000 serial_batches: False squaretv_weight: 1 test_flip: False tf_log: True tv_weight: 0.1 use_dropout: False use_preserve_mask_refine: False verbose: True warproot: which_epoch: latest write_loss_frep: 100 write_loss_frep_eval: 100 -------------- End ------------------ Using GPU: NVIDIA GeForce GTX 1080 Traceback (most recent call last): File "test_warping.py", line 61, in load_checkpoint_parallel(warp_model, opt.PBAFN_warp_checkpoint) File "D:\Downloads\GP-VTON\models\networks.py", line 296, in load_checkpoint_parallel checkpoint_new[param] = checkpoint[param] KeyError: 'image_features.encoders.0.1.block.2.weight'

im sure that is the right checkpoint because it was downloaded from gp-vton

here is the changed lines

Replaced the line

train_sampler = DistributedSampler(train_data)

With the following line

train_sampler = RandomSampler(train_data)

imported from : from torch.utils.data import RandomSampler

any help ? thanks

alexgenovese commented 10 months ago

OUT OF TOPIC – sorry for commenting here. Did you get the link to download the weights? May I ask you to share the links?