roman-bachmann commited on
Commit
1942098
1 Parent(s): b271ec3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -18,7 +18,7 @@ except Exception as e:
18
  if torch.cuda.is_available():
19
  device = "cuda"
20
  gpu_type = torch.cuda.get_device_name(torch.cuda.current_device())
21
- power_device = f"{gpu_type} GPU"
22
  torch.cuda.max_memory_allocated(device=device)
23
  else:
24
  device = "cpu"
@@ -36,7 +36,7 @@ torch.backends.cudnn.allow_tf32 = True
36
 
37
  MAX_SEED = np.iinfo(np.int32).max
38
 
39
- FM_MODEL_ID = 'EPFL-VILAB/4M-21_B'
40
  MODEL_NAME = FM_MODEL_ID.split('/')[1].replace('_', ' ')
41
 
42
  # Human poses visualization is disabled, since it needs SMPL weights. To enable human pose prediction and rendering:
@@ -111,9 +111,7 @@ with gr.Blocks(css=css, theme=gr.themes.Base()) as demo:
111
  [`Website`](https://4m.epfl.ch) | [`GitHub`](https://github.com/apple/ml-4m) <br>[`4M Paper (NeurIPS'23)`](https://arxiv.org/abs/2312.06647) | [`4M-21 Paper (arXiv'24)`](https://arxiv.org/abs/2406.09406)
112
 
113
  This demo predicts all modalities from a given RGB input, using [{FM_MODEL_ID}](https://huggingface.co/{FM_MODEL_ID}), running on *{power_device}*.
114
- For more generative examples, and to enable human pose visualizations, please see our [GitHub repo](https://github.com/apple/ml-4m).
115
-
116
- (Disclaimer: The demo is a work in progress. We will switch it to using 4M-21 XL when running on GPU. Until then, this space runs on CPU and takes several minutes for inference.)
117
  """)
118
 
119
  img_path = gr.Image(label='RGB input image', type='filepath')
 
18
  if torch.cuda.is_available():
19
  device = "cuda"
20
  gpu_type = torch.cuda.get_device_name(torch.cuda.current_device())
21
+ power_device = f"{gpu_type}"
22
  torch.cuda.max_memory_allocated(device=device)
23
  else:
24
  device = "cpu"
 
36
 
37
  MAX_SEED = np.iinfo(np.int32).max
38
 
39
+ FM_MODEL_ID = 'EPFL-VILAB/4M-21_XL'
40
  MODEL_NAME = FM_MODEL_ID.split('/')[1].replace('_', ' ')
41
 
42
  # Human poses visualization is disabled, since it needs SMPL weights. To enable human pose prediction and rendering:
 
111
  [`Website`](https://4m.epfl.ch) | [`GitHub`](https://github.com/apple/ml-4m) <br>[`4M Paper (NeurIPS'23)`](https://arxiv.org/abs/2312.06647) | [`4M-21 Paper (arXiv'24)`](https://arxiv.org/abs/2406.09406)
112
 
113
  This demo predicts all modalities from a given RGB input, using [{FM_MODEL_ID}](https://huggingface.co/{FM_MODEL_ID}), running on *{power_device}*.
114
+ For more generative examples, and to enable human pose visualizations, please see our [GitHub repo](https://github.com/apple/ml-4m).
 
 
115
  """)
116
 
117
  img_path = gr.Image(label='RGB input image', type='filepath')