nami0342 commited on
Commit
f64b8d2
Β·
1 Parent(s): 982e8cd

Support for zeroGPU-a

Browse files
README.md CHANGED
@@ -1,15 +1,14 @@
1
  ---
2
- title: GEN10 IDM-VTON Base
3
- emoji: ⚑
4
- colorFrom: gray
5
- colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 4.44.0
8
- python_version: 3.10.13
9
  app_file: app.py
10
  pinned: false
11
- license: apache-2.0
12
- short_description: 'Gen10μ‘° Base'
13
  ---
14
 
15
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: IDM VTON BASE
3
+ emoji: πŸ‘•πŸ‘”πŸ‘š
4
+ colorFrom: yellow
5
+ colorTo: red
6
  sdk: gradio
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
app.py CHANGED
@@ -123,6 +123,8 @@ pipe = TryonPipeline.from_pretrained(
123
  )
124
  pipe.unet_encoder = UNet_Encoder
125
 
 
 
126
  def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
127
 
128
  openpose_model.preprocessor.body_estimation.model.to(device)
 
123
  )
124
  pipe.unet_encoder = UNet_Encoder
125
 
126
+
127
+ @spaces.GPU
128
  def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
129
 
130
  openpose_model.preprocessor.body_estimation.model.to(device)
preprocess/openpose/run_openpose.py CHANGED
@@ -28,12 +28,12 @@ import pdb
28
 
29
  class OpenPose:
30
  def __init__(self, gpu_id: int):
31
- self.gpu_id = gpu_id
32
- torch.cuda.set_device(gpu_id)
33
  self.preprocessor = OpenposeDetector()
34
 
35
  def __call__(self, input_image, resolution=384):
36
- torch.cuda.set_device(self.gpu_id)
37
  if isinstance(input_image, Image.Image):
38
  input_image = np.asarray(input_image)
39
  elif type(input_image) == str:
 
28
 
29
  class OpenPose:
30
  def __init__(self, gpu_id: int):
31
+ # self.gpu_id = gpu_id
32
+ # torch.cuda.set_device(gpu_id)
33
  self.preprocessor = OpenposeDetector()
34
 
35
  def __call__(self, input_image, resolution=384):
36
+ # torch.cuda.set_device(self.gpu_id)
37
  if isinstance(input_image, Image.Image):
38
  input_image = np.asarray(input_image)
39
  elif type(input_image) == str:
requirements.txt CHANGED
@@ -1,10 +1,8 @@
1
- huggingface_hub~=0.23.0
2
- gradio==4.44.0
3
- transformers==4.36.2
4
  torch==2.1.0
5
  torchvision==0.16.0
6
  torchaudio==2.1.0
7
  numpy==1.24.4
 
8
  scipy==1.10.1
9
  scikit-image==0.21.0
10
  opencv-python==4.7.0.72
@@ -17,11 +15,10 @@ tqdm==4.64.1
17
  config==0.5.1
18
  einops==0.7.0
19
  onnxruntime==1.16.2
20
- datasets==2.19.0
21
- triton==2.1.0
22
  basicsr
23
  av
24
  fvcore
25
  cloudpickle
26
  omegaconf
27
- pycocotools
 
 
 
 
 
1
  torch==2.1.0
2
  torchvision==0.16.0
3
  torchaudio==2.1.0
4
  numpy==1.24.4
5
+ pydantic==2.10.6
6
  scipy==1.10.1
7
  scikit-image==0.21.0
8
  opencv-python==4.7.0.72
 
15
  config==0.5.1
16
  einops==0.7.0
17
  onnxruntime==1.16.2
 
 
18
  basicsr
19
  av
20
  fvcore
21
  cloudpickle
22
  omegaconf
23
+ pycocotools
24
+ huggingface_hub==0.25.0