Could you try to change this line
make_positions.range_buf = input.new()

to
make_positions.range_buf = input.new(input.size())

I’m not sure if an empty tensor might create this issue, but might be worth a shot.