ffmpeg using nvenc fails to transcode from hevc to h264

Whenever I try to transcode hevc to h264 using ffmpeg built with nvenc on newest drivers, I get this error:

[nvenc_h264 @ 000001e3039bda80] EncodePicture failed!
Video encoding failed
Conversion failed!

Tested with several hevc files.

hevc -> h264 in software works fine, as does any other format -> nvenc_h264