TVAI 533 force usage of CPU only on CLI

In the TVAI app on windows, i can set the AI processor to CPU. Also I can manage the models and mark and download the ones that I want for CPU usage. As a result the app renders (slow) on the CPU only.

Can this be replicated by command line usage in python? this ffmpeg always ends up GPU, even I download the CPU models in model managment:

    "cmd": [
        "S:/_apps/topaz/Topaz Video AI 5/ffmpeg.exe",
        "-y",
        "-loglevel","error",
        "-stats",
        "-nostdin",
        "-hwaccel","none",
        "-flush_packets","1",
        "-ss","00:01:54.000",
        "-hide_banner",
        "-i","C:\\DUST_VIDGRAB202312\\2023-12-15_21-16-13_R06.00_cropped.mkv",
        "-to","00:01:55.499",
        "-sws_flags","spline+accurate_rnd+full_chroma_int",
        "-filter_complex",
        "tvai_fi=model=chf-3:slowmo=1:rdt=0.01:fps=30:device=-2:vram=0.8:instances=1",
        "-c:v","prores_ks",
        "-profile:v","2",
        "-vendor","apl0",
        "-quant_mat","hq",
        "-bits_per_mb","1350",
        "-pix_fmt","yuv422p10le",
        "-movflags","frag_keyframe+empty_moov+delay_moov+use_metadata_tags+write_colr",
        "-an",
        "-map_metadata","0",
        "-map_metadata:s:v","0:s:v",
        "-metadata","videoai=CLI: Framerate changed to 30 using chf-3 replacing duplicate frames. range: part_d2.0_s0114.0_e0115.5",
        "C:\\DUST_VIDGRAB202312\\parts_d2.0\\2023-12-15_21-16-13_R06.00_Rai30.00_part_d2.0_s0114.0_e0115.5_cropped.mov"
    ],

Why do I want this? Since 2 months my nvidia GTX 980M keeps crashing. My CPU supports POPCNT. I have tried reinstalls etc. I still want to sustain the machine.

Thank you, Michael

device=-2 means “auto”. To force CPU, use device=-1

Andy

EDIT: If you selected CPU in the UI and the resulting CLI command you have shown is the result (i.e. device=-2 instead of -1), then that’s yet another bug and is worth reporting.

3 Likes

And GPU? device=0 or device=-3 ?

wow, thanks!

"gpuList" : "[{\"index\":-2,\"name\":\"Auto\"},{\"index\":-1,\"name\":\"CPU\"},{\"index\":0,\"name\":\"NVIDIA GeForce GTX 980M\"}]"

1 Like

it actually did say device=-1, I did not spot it. you saved my day, thanks

You’re most welcome.

Regards

Andy

1 Like

My understanding is that for N GPUs, n-1 specifies which GPU and N means “all GPUs”. If you happen to be in the CLI, then ffmpeg will list all options if you (deliberately) specify a device which is out of range.

To specify Low Power mode, use instances=0

Thanks.

Andy

2 Likes

it works! phantastic. can I get you a coffee?

2 Likes