diff --git a/winml/lib/Api.Image/TensorToVideoFrameConverter.cpp b/winml/lib/Api.Image/TensorToVideoFrameConverter.cpp index aea1addcccc76..b5d0becf638d0 100644 --- a/winml/lib/Api.Image/TensorToVideoFrameConverter.cpp +++ b/winml/lib/Api.Image/TensorToVideoFrameConverter.cpp @@ -483,7 +483,8 @@ void TensorToVideoFrameConverter::ConvertGPUTensorToDX12Texture( PipelineStateCacheFormat formatFrom = PipelineStateCacheFormat::kBGR8; if (tensorDesc.channelType == kImageTensorChannelTypeRGB8) { formatFrom = PipelineStateCacheFormat::kRGB8; - } else if (inputDesc.Format == kImageTensorChannelTypeGRAY8) { + } else if (inputDesc.Format == DXGI_FORMAT_R8_UNORM || + tensorDesc.channelType == kImageTensorChannelTypeGRAY8) { formatFrom = PipelineStateCacheFormat::kGRAY8; }