Dan Bochman commited on
Commit
05346fa
·
unverified ·
1 Parent(s): 5310d0a

remove casting to bf16

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -112,9 +112,7 @@ model.to("cuda")
112
 
113
  @spaces.GPU
114
  @torch.inference_mode()
115
- @torch.autocast(device_type="cuda", dtype=torch.bfloat16)
116
  def run_model(input_tensor, height, width):
117
- input_tensor = input_tensor.to(device="cuda", dtype=torch.bfloat16) # explicit cast to bfloat16
118
  output = model(input_tensor)
119
  output = torch.nn.functional.interpolate(output, size=(height, width), mode="bilinear", align_corners=False)
120
  _, preds = torch.max(output, 1)
 
112
 
113
  @spaces.GPU
114
  @torch.inference_mode()
 
115
  def run_model(input_tensor, height, width):
 
116
  output = model(input_tensor)
117
  output = torch.nn.functional.interpolate(output, size=(height, width), mode="bilinear", align_corners=False)
118
  _, preds = torch.max(output, 1)