xxie commited on
Commit
17949c6
1 Parent(s): 6b181f4

install specific torch

Browse files
Files changed (3) hide show
  1. app.py +8 -7
  2. pre-requirements.txt +6 -2
  3. requirements.txt +1 -1
app.py CHANGED
@@ -139,7 +139,7 @@ def inference(runner: DemoRunner, cfg: ProjectConfig, rgb, mask_hum, mask_obj, s
139
 
140
 
141
  @hydra.main(config_path='configs', config_name='configs', version_base='1.1')
142
- def main(cfg: ProjectConfig, args):
143
  # Setup model
144
  runner = DemoRunner(cfg)
145
 
@@ -152,7 +152,8 @@ def main(cfg: ProjectConfig, args):
152
  with demo:
153
  gr.Markdown(md_description)
154
  gr.HTML("""<h1 style="text-align:center; color:#10768c">HDM Demo</h1>""")
155
- gr.HTML("""<h3 style="text-align:center; color:#10768c">Instruction: Upload RGB, human, object masks and then click reconstruct.</h1>""")
 
156
 
157
  # Input data
158
  with gr.Row():
@@ -200,12 +201,12 @@ def main(cfg: ProjectConfig, args):
200
 
201
  # demo.launch(share=True)
202
  # Enabling queue for runtime>60s, see: https://github.com/tloen/alpaca-lora/issues/60#issuecomment-1510006062
203
- demo.queue().launch(share=args.share)
204
 
205
  if __name__ == '__main__':
206
  from argparse import ArgumentParser
207
- parser = ArgumentParser()
208
- parser.add_argument('-share', default=False, action='store_true', help='allow a temporal public url')
209
- args = parser.parse_args()
210
 
211
- main(args)
 
139
 
140
 
141
  @hydra.main(config_path='configs', config_name='configs', version_base='1.1')
142
+ def main(cfg: ProjectConfig):
143
  # Setup model
144
  runner = DemoRunner(cfg)
145
 
 
152
  with demo:
153
  gr.Markdown(md_description)
154
  gr.HTML("""<h1 style="text-align:center; color:#10768c">HDM Demo</h1>""")
155
+ gr.HTML("""<p style="text-align:center; color:#10768c">Instruction: Upload RGB, human, object masks and then click reconstruct.</p>""")
156
+ gr.HTML("""<p style="text-align:center; color:#10768c">You can use these methods to obtain the masks: </p>""")
157
 
158
  # Input data
159
  with gr.Row():
 
201
 
202
  # demo.launch(share=True)
203
  # Enabling queue for runtime>60s, see: https://github.com/tloen/alpaca-lora/issues/60#issuecomment-1510006062
204
+ demo.queue().launch()
205
 
206
  if __name__ == '__main__':
207
  from argparse import ArgumentParser
208
+ # parser = ArgumentParser()
209
+ # parser.add_argument('-share', default=False, action='store_true', help='allow a temporal public url')
210
+ # args = parser.parse_args()
211
 
212
+ main()
pre-requirements.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  accelerate
2
  diffusers
3
  hydra-core
@@ -8,11 +12,11 @@ plotly
8
  rich
9
  scipy
10
  timm
11
- torch
12
  torch-ema
13
  tqdm
14
  transformers
15
  wandb
16
  trimesh
17
  gradio
18
-
 
 
1
+ --extra-index-url https://download.pytorch.org/whl/cu113
2
+ torch==1.11.0+cu113
3
+ torchvision==0.12.0+cu113
4
+ torchaudio==0.11.0
5
  accelerate
6
  diffusers
7
  hydra-core
 
12
  rich
13
  scipy
14
  timm
 
15
  torch-ema
16
  tqdm
17
  transformers
18
  wandb
19
  trimesh
20
  gradio
21
+ fvcore
22
+ iopath
requirements.txt CHANGED
@@ -14,4 +14,4 @@ transformers
14
  wandb
15
  trimesh
16
  gradio
17
- pytorch3d@git+https://github.com/facebookresearch/pytorch3d.git
 
14
  wandb
15
  trimesh
16
  gradio
17
+ https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1110/pytorch3d-0.7.2-cp38-cp38-linux_x86_64.whl