Yes i tried both ways when i applied tensor = tensor.cuda() it throws error
Traceback (most recent call last):
  File "app.py", line 46, in <module>
    outputs = model.forward(tensor)
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\yolo.py", line 121, in forward
    return self.forward_once(x, profile)  # single-scale inference, train
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\yolo.py", line 137, in forward_once
    x = m(x)  # run
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\common.py", line 93, in forward
    return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\common.py", line 34, in forward
    return self.act(self.bn(self.conv(x)))
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\conv.py", line 423, in forward
    return self._conv_forward(input, self.weight)
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\conv.py", line 419, in _conv_forward
    return F.conv2d(input, weight, self.bias, self.stride,
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same

and if i removed  tensor = tensor.cuda()
Traceback (most recent call last):
  File "app.py", line 46, in <module>
    outputs = model.forward(tensor)
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\yolo.py", line 121, in forward
    return self.forward_once(x, profile)  # single-scale inference, train
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\yolo.py", line 137, in forward_once
    x = m(x)  # run
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\common.py", line 93, in forward
    return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\D.ShaN\Documents\projects\python\fyp\helmet_covers_yolo\test\models\common.py", line 34, in forward
    return self.act(self.bn(self.conv(x)))
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\conv.py", line 423, in forward
    return self._conv_forward(input, self.weight)
  File "C:\Users\D.ShaN\AppData\Local\conda\conda\envs\fyp\lib\site-packages\torch\nn\modules\conv.py", line 419, in _conv_forward
    return F.conv2d(input, weight, self.bias, self.stride,
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same

Sorry I updated the question  with correct error stack