luxiaolili / IDM-VTON-train

53 stars 3 forks source link

mask preprocess #5

Closed Nomination-NRB closed 4 months ago

Nomination-NRB commented 4 months ago

May I ask why the mask is not used after preprocessing, but obtained from sample and interpolated again? Is this mask preprocessing still necessary?

# line 446
mask = mask_processor.preprocess(sample["mask"], height=args.height, width=args.width, crops_coords=None, resize_mode="default")
mask = F.interpolate(sample['mask'].to(torch.float32), size=(int(args.height/8), int(args.width/8)))
mask = mask.to(accelerator.device, dtype=torch.float16)
luxiaolili commented 4 months ago

May I ask why the mask is not used after preprocessing, but obtained from sample and interpolated again? Is this mask preprocessing still necessary?

# line 446
mask = mask_processor.preprocess(sample["mask"], height=args.height, width=args.width, crops_coords=None, resize_mode="default")
mask = F.interpolate(sample['mask'].to(torch.float32), size=(int(args.height/8), int(args.width/8)))
mask = mask.to(accelerator.device, dtype=torch.float16)

no need for mask_processor, I delete it