Solved by Shisho_Sama in post #3 
              
              
                Thank you very very much. That indeed helped me spot the culprit! 
I had to use transform.ToTensor() prior to calling the Lighting() method. Failing to do so resulted in a PIL image being sent as the input for lightining() which expects a Tensor and that’s why the error occurs. 
So it should have be…