I had a similar issue. Solved using this page: https://trac.ffmpeg.org/wiki/HWAccelIntro
I add : -noautoscale -filter_complex [0:0]scale_cuda=iw:-2[out] -map [out]
-noautoscale -filter_complex [0:0]scale_cuda=iw:-2[out] -map [out] from: mps = f'/home/pierre/ffmpeg/ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i {folderv}{file} -c:v av1_nvenc -preset p7 -tune hq -rc-lookahead 53 -cq:v {qffmpeg} -spatial-aq 1 -aq-strength 2 -c:a copy {folderv}{target}' to mps=f'/home/pierre/ffmpeg/ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i {folderv}{file} -noautoscale -filter_complex [0:0]scale_cuda=iw:-2[out] -map [out] -c:v av1_nvenc -preset p7 -tune hq -rc-lookahead 53 -cq:v {qffmpeg} -spatial-aq 1 -aq-strength 2 -c:a copy {folderv}{target}'
mps = f'/home/pierre/ffmpeg/ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i {folderv}{file} -c:v av1_nvenc -preset p7 -tune hq -rc-lookahead 53 -cq:v {qffmpeg} -spatial-aq 1 -aq-strength 2 -c:a copy {folderv}{target}' to
mps=f'/home/pierre/ffmpeg/ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i {folderv}{file} -noautoscale -filter_complex [0:0]scale_cuda=iw:-2[out] -map [out] -c:v av1_nvenc -preset p7 -tune hq -rc-lookahead 53 -cq:v {qffmpeg} -spatial-aq 1 -aq-strength 2 -c:a copy {folderv}{target}'