levihsu commited on
Commit
d9d3ece
1 Parent(s): 487bf02

Update ootd/inference_ootd_hd.py

Browse files
Files changed (1) hide show
  1. ootd/inference_ootd_hd.py +22 -22
ootd/inference_ootd_hd.py CHANGED
@@ -36,37 +36,37 @@ class OOTDiffusionHD:
36
  def __init__(self, gpu_id):
37
  self.gpu_id = 'cuda:' + str(gpu_id)
38
 
39
- vae = AutoencoderKL.from_pretrained(
40
- VAE_PATH,
41
- subfolder="vae",
42
- torch_dtype=torch.float16,
43
- )
44
-
45
- unet_garm = UNetGarm2DConditionModel.from_pretrained(
46
- UNET_PATH,
47
- subfolder="unet_garm",
48
- torch_dtype=torch.float16,
49
- use_safetensors=True,
50
- )
51
- unet_vton = UNetVton2DConditionModel.from_pretrained(
52
- UNET_PATH,
53
- subfolder="unet_vton",
54
- torch_dtype=torch.float16,
55
- use_safetensors=True,
56
- )
57
 
58
  self.pipe = OotdPipeline.from_pretrained(
59
  MODEL_PATH,
60
- unet_garm=unet_garm,
61
- unet_vton=unet_vton,
62
- vae=vae,
63
  torch_dtype=torch.float16,
64
  variant="fp16",
65
  use_safetensors=True,
66
  safety_checker=None,
67
  requires_safety_checker=False,
68
  ).to(self.gpu_id)
69
-
 
 
 
70
  self.pipe.scheduler = UniPCMultistepScheduler.from_config(self.pipe.scheduler.config)
71
 
72
  self.auto_processor = AutoProcessor.from_pretrained(VIT_PATH)
 
36
  def __init__(self, gpu_id):
37
  self.gpu_id = 'cuda:' + str(gpu_id)
38
 
39
+ # vae = AutoencoderKL.from_pretrained(
40
+ # VAE_PATH,
41
+ # subfolder="vae",
42
+ # torch_dtype=torch.float16,
43
+ # )
44
+
45
+ # unet_garm = UNetGarm2DConditionModel.from_pretrained(
46
+ # UNET_PATH,
47
+ # subfolder="unet_garm",
48
+ # torch_dtype=torch.float16,
49
+ # use_safetensors=True,
50
+ # )
51
+ # unet_vton = UNetVton2DConditionModel.from_pretrained(
52
+ # UNET_PATH,
53
+ # subfolder="unet_vton",
54
+ # torch_dtype=torch.float16,
55
+ # use_safetensors=True,
56
+ # )
57
 
58
  self.pipe = OotdPipeline.from_pretrained(
59
  MODEL_PATH,
 
 
 
60
  torch_dtype=torch.float16,
61
  variant="fp16",
62
  use_safetensors=True,
63
  safety_checker=None,
64
  requires_safety_checker=False,
65
  ).to(self.gpu_id)
66
+ # vae=vae,
67
+ # unet_garm=unet_garm,
68
+ # unet_vton=unet_vton,
69
+
70
  self.pipe.scheduler = UniPCMultistepScheduler.from_config(self.pipe.scheduler.config)
71
 
72
  self.auto_processor = AutoProcessor.from_pretrained(VIT_PATH)