k4yt3x / video2x

A machine learning-based lossless video super resolution framework. Est. Hack the Valley II, 2018.
https://video2x.org
GNU Affero General Public License v3.0
10.69k stars 1k forks source link

invalid graphics card #570

Closed arch-user-france1 closed 2 years ago

arch-user-france1 commented 2 years ago
sudo docker run --rm -it --gpus all -v /dev/dri:/dev/dri -v $PWD:/host k4yt3x/video2x:4.6.0 -d waifu2x_ncnn_vulkan -r 2 -i CrimsonDesert.mp4 -o output-vid.mp4 

    __      __  _       _                  ___   __   __
    \ \    / / (_)     | |                |__ \  \ \ / /
     \ \  / /   _    __| |   ___    ___      ) |  \ V /
      \ \/ /   | |  / _` |  / _ \  / _ \    / /    > <
       \  /    | | | (_| | |  __/ | (_) |  / /_   / . \
        \/     |_|  \__,_|  \___|  \___/  |____| /_/ \_\

                  Video2X Video Enlarger

                       Version 4.1.1

2021-11-23 12:25:07.798741 [+] INFO: Redirecting console logs to /video2x/src/video2x_2021-11-23_12-25-07.log
[+] INFO: Loading files into processing queue
2021-11-23 12:25:07.824257 [+] INFO: Input path(s): CrimsonDesert.mp4
[+] INFO: Loaded files into processing queue
2021-11-23 12:25:07.895153 [+] INFO: Input file: /host/CrimsonDesert.mp4
2021-11-23 12:25:07.895272 [+] INFO: Creating cache directory /tmp/video2x
2021-11-23 12:25:07.895539 [+] INFO: Extracted frames are being saved to: /tmp/video2x/tmpv3w80eh_
2021-11-23 12:25:07.895646 [+] INFO: Upscaled frames are being saved to: /tmp/video2x/tmpxlr4nhh1
[+] INFO: Reading video information
2021-11-23 12:25:07.895730 [+] INFO: Executing: /usr/bin/ffprobe -v quiet -print_format json -show_format -show_streams -i /host/CrimsonDesert.mp4
[+] INFO: Framerate: 29.97002997002997
2021-11-23 12:25:09.554639 [+] INFO: Executing: /usr/bin/ffmpeg -hwaccel auto -y -i /host/CrimsonDesert.mp4 -pix_fmt rgba64be /tmp/video2x/tmpv3w80eh_/extracted_%0d.png
2021-11-23 12:25:09.579748 [+] INFO: Main process waiting for subprocesses to exit
ffmpeg version 4.1.4-1build2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.2.1-4ubuntu1)
  configuration: --prefix=/usr --extra-version=1build2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/host/CrimsonDesert.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-12-11T18:08:04.000000Z
  Duration: 00:05:27.98, start: 0.000000, bitrate: 1488 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 1356 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2020-12-11T18:08:04.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 12/11/2020.
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2020-12-11T18:08:04.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 12/11/2020.
[AVHWDeviceContext @ 0x55e04520c580] No VA display found for device: .
Device creation failed: -22.
[AVHWDeviceContext @ 0x55e045207e40] Cannot open the X11 display .
Device creation failed: -1313558101.
[h264 @ 0x55e04520a500] Auto hwaccel disabled: no device found.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 0x55e045477e80] No accelerated colorspace conversion found from yuv420p to rgba64be.
Output #0, image2, to '/tmp/video2x/tmpv3w80eh_/extracted_%0d.png':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf58.20.100
    Stream #0:0(und): Video: png, rgba64be, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2020-12-11T18:08:04.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 12/11/2020.
      encoder         : Lavc58.35.100 png
frame= 9829 fps=6.5 q=-0.0 Lsize=N/A time=00:05:27.96 bitrate=N/A speed=0.217x    
video:25829588kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2021-11-23 12:50:18.965173 [+] INFO: Subprocess 10 exited with code 0
[+] INFO: Starting to upscale extracted frames
2021-11-23 12:50:19.206673 [+] INFO: [upscaler] Subprocess 1 executing: /video2x/src/dependencies/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan -g 0 -j 1:1:1 -n 2 -s 2 -t 400 -i /tmp/video2x/tmpv3w80eh_ -o /tmp/video2x/tmpxlr4nhh1
2021-11-23 12:50:19.221837 [+] INFO: Starting progress monitor
2021-11-23 12:50:19.222296 [+] INFO: Starting upscaled image cleaner
2021-11-23 12:50:19.222663 [+] INFO: Main process waiting for subprocesses to exit
Upscaling Progress:   0%|          | 0/9829 [00:00<?, ?it/s]vkCreateInstance failed -9
invalid gpu device
[!] ERROR: Subprocess 24 exited with code 255
[!] ERROR: Subprocess execution ran into an error
[!] WARNING: Terminating all processes
2021-11-23 12:50:20.041485 [+] INFO: Killing progress monitor
Upscaling Progress:   0%|          | 0/9829 [00:01<?, ?it/s]
2021-11-23 12:50:20.948690 [+] INFO: Killing upscaled image cleaner
Cleaning up cache directory: /tmp/video2x/tmpv3w80eh_
Cleaning up cache directory: /tmp/video2x/tmpxlr4nhh1
Cleaning up cache directory: /tmp/video2x
[!] ERROR: An exception has occurred
Traceback (most recent call last):
  File "/video2x/src/video2x.py", line 259, in <module>
    upscaler.run()
  File "/video2x/src/upscaler.py", line 667, in run
    raise e
  File "/video2x/src/upscaler.py", line 596, in run
    self._upscale_frames()
  File "/video2x/src/upscaler.py", line 339, in _upscale_frames
    raise e
  File "/video2x/src/upscaler.py", line 331, in _upscale_frames
    self._wait()
  File "/video2x/src/upscaler.py", line 401, in _wait
    raise e
  File "/video2x/src/upscaler.py", line 385, in _wait
    raise subprocess.CalledProcessError(process_status, process.args)
subprocess.CalledProcessError: Command '['/video2x/src/dependencies/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan', '-g', '0', '-j', '1:1:1', '-n', '2', '-s', '2', '-t', '400', '-i', '/tmp/video2x/tmpv3w80eh_', '-o', '/tmp/video2x/tmpxlr4nhh1']' returned non-zero exit status 255.

There's an intel iGPU (not connected to any screen) and nvidia geforce gtx 1660 super

arch-user-france1 commented 2 years ago

I'm using the newest docker version of video2x

k4yt3x commented 2 years ago

Make sure you've already checked this out: https://github.com/K4YT3X/video2x/wiki/Docker#prerequisites

arch-user-france1 commented 2 years ago
yay -S nvidia-container-toolkit                                                                                                                                        
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  nvidia-container-toolkit-1.5.1-1

  1 nvidia-container-toolkit                 (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 

I guess I have? I also have nvidia-container-runtime but I haven't runtime-bin as this conflicts with nvidia-container-runtime

k4yt3x commented 2 years ago

The host must have driver version 440, uniform with which that is inside of the Docker container.

Also pay attention to this. Arch's nvidia-dkms is now at 495.44-6.

k4yt3x commented 2 years ago

Try the new 5.0.0 beta container https://github.com/k4yt3x/video2x/pkgs/container/video2x