gaur3009 commited on
Commit
1edd3bd
·
verified ·
1 Parent(s): 0c09bb4

Update warp_design_on_dress.py

Browse files
Files changed (1) hide show
  1. warp_design_on_dress.py +5 -4
warp_design_on_dress.py CHANGED
@@ -3,7 +3,7 @@ import torch
3
  import torch.nn.functional as F
4
  from torchvision import transforms
5
  from PIL import Image
6
- from networks import GMM, UnetGenerator, load_checkpoint
7
 
8
 
9
  def run_design_warp_on_dress(dress_path, design_path, gmm_ckpt, tom_ckpt, output_dir):
@@ -25,9 +25,10 @@ def run_design_warp_on_dress(dress_path, design_path, gmm_ckpt, tom_ckpt, output
25
 
26
  # Fake agnostic: use the dress image itself
27
  agnostic = dress_tensor.clone()
28
-
29
- gmm = GMM(opt = None)
30
- load_checkpoint(gmm, gmm_ckpt)
 
31
  gmm.cpu().eval()
32
 
33
  with torch.no_grad():
 
3
  import torch.nn.functional as F
4
  from torchvision import transforms
5
  from PIL import Image
6
+ from networks import GMM, UnetGenerator, load_checkpoint, Options
7
 
8
 
9
  def run_design_warp_on_dress(dress_path, design_path, gmm_ckpt, tom_ckpt, output_dir):
 
25
 
26
  # Fake agnostic: use the dress image itself
27
  agnostic = dress_tensor.clone()
28
+
29
+ opt = Options()
30
+ gmm = GMM(opt)
31
+ load_checkpoint(gmm, gmm_ckpt, strict = False)
32
  gmm.cpu().eval()
33
 
34
  with torch.no_grad():