Skip to content

Error, Script evaluation failed #56

@Odjur

Description

@Odjur

Tried #54 with no success. Looks like there may have been an update since then, or I'm running into a slightly different version of the problem.

Notably upscaling does work on some videos, but not others, despite both playing back correctly. I'm not sure what the difference is.

Generating TensorRT engine with command: python\VSPipe.exe -c y4m --arg "slot=1" --arg "video_path=E:\Videos\test.mkv" --start 0 --end 1 "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_encode.vpy" -p .
run_animejanai slot 1 chain_1
chain_conf {'min_px': 0.0, 'max_px': inf, 'min_resolution': '0x0', 'max_resolution': '0x0', 'min_fps': 0.0, 'max_fps': inf, 'models': [{'resize_factor_before_upscale': 100.0, 'resize_height_before_upscale': 0.0, 'name': '2xLiveActionV1_SPAN_490000'}], 'rife': False, 'rife_factor_numerator': 2, 'rife_factor_denominator': 1, 'rife_model': 422, 'rife_ensemble': False, 'rife_scene_detect_threshold': 0.15, 'final_resize_height': 0.0, 'final_resize_factor': 100.0, 'tensorrt_engine_settings': ''}
upscale2x: scaling 2x from 720x1280 with engine=2xLiveActionV1_SPAN_490000; num_streams=4
trt_settings --bf16 --minShapes=input:1x3x8x8 --optShapes=input:1x3x1080x1920 --maxShapes=input:1x3x1080x1920 --inputIOFormats=fp32:chw --outputIOFormats=fp32:chw --tacticSources=+CUDNN,-CUBLAS,-CUBLAS_LT --skipInference
IRuntime::deserializeCudaEngine: Error Code 6: API Usage Error (The engine plan file is not compatible with this version of TensorRT, expecting library version 10.8.0.43 got 
.	.)
upscale2x: scaling 2x from 720x1280 with engine=2xLiveActionV1_SPAN_490000; num_streams=4
trt_settings --bf16 --minShapes=input:1x3x8x8 --optShapes=input:1x3x1080x1920 --maxShapes=input:1x3x1080x1920 --inputIOFormats=fp32:chw --outputIOFormats=fp32:chw --tacticSources=+CUDNN,-CUBLAS,-CUBLAS_LT --skipInference
IRuntime::deserializeCudaEngine: Error Code 6: API Usage Error (The engine plan file is not compatible with this version of TensorRT, expecting library version 10.8.0.43 got 
.	.)
Script evaluation failed:
Python exception: operator (): engine deserialization failed
Traceback (most recent call last):
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 209, in run_animejanai
    clip = run_animejanai_upscale(clip, backend, model_conf, trt_settings, num_streams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 268, in run_animejanai_upscale
    return upscale2x(clip, backend, model_conf['name'], num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 153, in upscale2x
    return upscale2x_trt(clip, engine_name, num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 171, in upscale2x_trt
    return core.trt.Model(
           ^^^^^^^^^^^^^^^
  File "src\\cython\\vapoursynth.pyx", line 3123, in vapoursynth.Function.__call__
vapoursynth.Error: operator (): engine deserialization failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "src\\cython\\vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
  File "src\\cython\\vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_encode.vpy", line 20, in <module>
    animejanai_core.run_animejanai_with_keybinding(clip, clip.fps, slot)
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 301, in run_animejanai_with_keybinding
    run_animejanai(clip, container_fps, chain_conf, config['global']['backend'])
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 219, in run_animejanai
    clip = run_animejanai_upscale(clip, backend, model_conf, trt_settings, num_streams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 268, in run_animejanai_upscale
    return upscale2x(clip, backend, model_conf['name'], num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 153, in upscale2x
    return upscale2x_trt(clip, engine_name, num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 171, in upscale2x_trt
    return core.trt.Model(
           ^^^^^^^^^^^^^^^
  File "src\\cython\\vapoursynth.pyx", line 3123, in vapoursynth.Function.__call__
vapoursynth.Error: operator (): engine deserialization failed
Upscaling with command: python\VSPipe.exe -c y4m --arg "slot=1" --arg "video_path=E:\Videos\test.mkv" "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_encode.vpy" - | "C:\Users\Odjur\AppData\Roaming\VideoJaNai\ffmpeg\ffmpeg.exe" -y -i pipe: -i "E:\Videos\test.mkv" -map 0:v -c:v hevc_nvenc -preset p7 -profile:v main10 -b:v 50M -max_interleave_delta 0 -max_interleave_delta 0 -map 1:t? -map 1:a?  -map 1:s? -c:t copy -c:a copy -c:s copy "E:\Output\test.mkv"
ffmpeg version 2026-01-19-git-43dbc011fa-essentials_build-www.gyan.dev Copyright (c) 2000-2026 the FFmpeg developers
  built with gcc 15.2.0 (Rev8, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-cairo --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-openal --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      60. 23.100 / 60. 23.100
  libavcodec     62. 23.102 / 62. 23.102
  libavformat    62.  8.102 / 62.  8.102
  libavdevice    62.  2.100 / 62.  2.100
  libavfilter    11. 11.101 / 11. 11.101
  libswscale      9.  3.100 /  9.  3.100
  libswresample   6.  2.100 /  6.  2.100
run_animejanai slot 1 chain_1
chain_conf {'min_px': 0.0, 'max_px': inf, 'min_resolution': '0x0', 'max_resolution': '0x0', 'min_fps': 0.0, 'max_fps': inf, 'models': [{'resize_factor_before_upscale': 100.0, 'resize_height_before_upscale': 0.0, 'name': '2xLiveActionV1_SPAN_490000'}], 'rife': False, 'rife_factor_numerator': 2, 'rife_factor_denominator': 1, 'rife_model': 422, 'rife_ensemble': False, 'rife_scene_detect_threshold': 0.15, 'final_resize_height': 0.0, 'final_resize_factor': 100.0, 'tensorrt_engine_settings': ''}
upscale2x: scaling 2x from 720x1280 with engine=2xLiveActionV1_SPAN_490000; num_streams=4
trt_settings --bf16 --minShapes=input:1x3x8x8 --optShapes=input:1x3x1080x1920 --maxShapes=input:1x3x1080x1920 --inputIOFormats=fp32:chw --outputIOFormats=fp32:chw --tacticSources=+CUDNN,-CUBLAS,-CUBLAS_LT --skipInference
IRuntime::deserializeCudaEngine: Error Code 6: API Usage Error (The engine plan file is not compatible with this version of TensorRT, expecting library version 10.8.0.43 got 
.	.)
upscale2x: scaling 2x from 720x1280 with engine=2xLiveActionV1_SPAN_490000; num_streams=4
trt_settings --bf16 --minShapes=input:1x3x8x8 --optShapes=input:1x3x1080x1920 --maxShapes=input:1x3x1080x1920 --inputIOFormats=fp32:chw --outputIOFormats=fp32:chw --tacticSources=+CUDNN,-CUBLAS,-CUBLAS_LT --skipInference
IRuntime::deserializeCudaEngine: Error Code 6: API Usage Error (The engine plan file is not compatible with this version of TensorRT, expecting library version 10.8.0.43 got 
.	.)
Script evaluation failed:
Python exception: operator (): engine deserialization failed
Traceback (most recent call last):
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 209, in run_animejanai
    clip = run_animejanai_upscale(clip, backend, model_conf, trt_settings, num_streams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 268, in run_animejanai_upscale
    return upscale2x(clip, backend, model_conf['name'], num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 153, in upscale2x
    return upscale2x_trt(clip, engine_name, num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 171, in upscale2x_trt
    return core.trt.Model(
           ^^^^^^^^^^^^^^^
  File "src\\cython\\vapoursynth.pyx", line 3123, in vapoursynth.Function.__call__
vapoursynth.Error: operator (): engine deserialization failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "src\\cython\\vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
  File "src\\cython\\vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_encode.vpy", line 20, in <module>
    animejanai_core.run_animejanai_with_keybinding(clip, clip.fps, slot)
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 301, in run_animejanai_with_keybinding
    run_animejanai(clip, container_fps, chain_conf, config['global']['backend'])
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 219, in run_animejanai
    clip = run_animejanai_upscale(clip, backend, model_conf, trt_settings, num_streams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 268, in run_animejanai_upscale
    return upscale2x(clip, backend, model_conf['name'], num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 153, in upscale2x
    return upscale2x_trt(clip, engine_name, num_streams, trt_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\VideoJaNai\current\backend\animejanai\core\animejanai_core.py", line 171, in upscale2x_trt
    return core.trt.Model(
           ^^^^^^^^^^^^^^^
  File "src\\cython\\vapoursynth.pyx", line 3123, in vapoursynth.Function.__call__
vapoursynth.Error: operator (): engine deserialization failed
[in#0 @ 000001fb44257400] Error opening input: Invalid data found when processing input
Error opening input file pipe:.
Error opening input files: Invalid data found when processing input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions