As the error message claims, you cannot use an if condition on multiple values and would need to split the tensor.
Assuming you want to pass the values matching the condition to self.modelPredictor and return the others, you could apply this workflow:
# output from previous layer
x = torch.randn(10, 1)

# create condition
idx = x > 0.

# split the data based on condition
x_true = x[idx]
x_false = x[~idx]

# check shapes
print(x_true.shape)
> torch.Size([3])
print(x_false.shape)
> torch.Size([7])

# apply special path for True values
out_true = self.modelPredictor(x_true)

# concatenate outputs
out = torch.zeros_like(x)
out[idx] = out_true
out[~idx] = x_false

You might also want to add a few more checks to handle e.g. empty tensors etc.