nami0342 commited on
Commit
27c6e87
Β·
1 Parent(s): 774cc79

Update src

Browse files
README.md CHANGED
@@ -8,7 +8,7 @@ sdk_version: 4.24.0
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-sa-4.0
11
- short_description: IDM VTOM BASE
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-sa-4.0
11
+ short_description: IDM VTON BASE
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
preprocess/humanparsing/run_parsing.py CHANGED
@@ -11,12 +11,12 @@ import torch
11
 
12
  class Parsing:
13
  def __init__(self, gpu_id: int):
14
- self.gpu_id = gpu_id
15
- torch.cuda.set_device(gpu_id)
16
  session_options = ort.SessionOptions()
17
  session_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
18
  session_options.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
19
- session_options.add_session_config_entry('gpu_id', str(gpu_id))
20
  self.session = ort.InferenceSession(os.path.join(Path(__file__).absolute().parents[2].absolute(), 'ckpt/humanparsing/parsing_atr.onnx'),
21
  sess_options=session_options, providers=['CPUExecutionProvider'])
22
  self.lip_session = ort.InferenceSession(os.path.join(Path(__file__).absolute().parents[2].absolute(), 'ckpt/humanparsing/parsing_lip.onnx'),
 
11
 
12
  class Parsing:
13
  def __init__(self, gpu_id: int):
14
+ # self.gpu_id = gpu_id
15
+ # torch.cuda.set_device(gpu_id)
16
  session_options = ort.SessionOptions()
17
  session_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
18
  session_options.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
19
+ # session_options.add_session_config_entry('gpu_id', str(gpu_id))
20
  self.session = ort.InferenceSession(os.path.join(Path(__file__).absolute().parents[2].absolute(), 'ckpt/humanparsing/parsing_atr.onnx'),
21
  sess_options=session_options, providers=['CPUExecutionProvider'])
22
  self.lip_session = ort.InferenceSession(os.path.join(Path(__file__).absolute().parents[2].absolute(), 'ckpt/humanparsing/parsing_lip.onnx'),
preprocess/openpose/run_openpose.py CHANGED
@@ -1,6 +1,6 @@
1
  import pdb
2
 
3
- # import config
4
  from pathlib import Path
5
  import sys
6
 
@@ -82,3 +82,4 @@ if __name__ == '__main__':
82
 
83
  model = OpenPose()
84
  model('./images/bad_model.jpg')
 
 
1
  import pdb
2
 
3
+ import config
4
  from pathlib import Path
5
  import sys
6
 
 
82
 
83
  model = OpenPose()
84
  model('./images/bad_model.jpg')
85
+