Functiontensor2img Converts a torch Tensor into an image Numpy array of BGR channel order Input: 4D(B,(3/1),H,W), 3D(C,H,W), or 2D(H,W), any range, RGB channel
diffportrait360_release/code/model_lib/ControlNet/ldm/modules/image_degradation/utils_image.py:342