Open leoRubberduck opened 2 days ago
Hi. Yes, probably, but cannot give much advise as I only use Linux. You probably have a better chance to run it on your Nvidia PC.
Installing the system dependencies python/gstreamer/ffmpeg
shouldn't be too hard on Ubuntu as all of it should be available in their package repository.
After installing the python package/dependencies you can check first if your GPU is detected properly. In python:
import torch
torch.cuda.is_available()
That should print true
On MacOS you may be able to install the system dependencies via homebrew. But there are probably some changes necessary to make it run on ARM / Apple Silicon.
Good luck!
I've updated the installation instruction a little bit and gave a bit more pointers. Didn't notice any Linux-only dependencies so if you prefer you could also try to run it directly on Windows as an alternative to WSL
What do you mean run it directly on Windows without WSL? Do you mean use PowerShell or something to install it?
Yes but if you're able to install ubuntu via WSL then that would probably be easiest route as you can get those system dependencies all from the repository.
Yeah there seems to be a problem. I followed these steps below:
I get stuck when it tries to build dependencies :
python -m pip install -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.4/index.html -e ".[basicvsrpp,gui]"
gives me this error:
Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [24 lines of output]
meson setup /tmp/pip-install-rl544h8j/pygobject_254bd89ad42f484a9ca3ff547234af2d /tmp/pip-install-rl544h8j/pygobject_254bd89ad42f484a9ca3ff547234af2d/.mesonpy-8wnwhr7s -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dtests=false -Dwheel=true --wrap-mode=nofallback --native-file=/tmp/pip-install-rl544h8j/pygobject_254bd89ad42f484a9ca3ff547234af2d/.mesonpy-8wnwhr7s/meson-python-native-file.ini The Meson build system Version: 1.6.0 Source dir: /tmp/pip-install-rl544h8j/pygobject_254bd89ad42f484a9ca3ff547234af2d Build dir: /tmp/pip-install-rl544h8j/pygobject_254bd89ad42f484a9ca3ff547234af2d/.mesonpy-8wnwhr7s Build type: native build Project name: pygobject Project version: 3.50.0 C compiler for the host machine: cc (gcc 13.2.0 "cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0") C linker for the host machine: cc ld.bfd 2.42 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python3 found: YES (/home/kl18/lada/.venv/bin/python) Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1 Run-time dependency python found: YES 3.12 Did not find CMake 'cmake' Found CMake: NO Run-time dependency gobject-introspection-1.0 found: NO (tried pkgconfig and cmake) Not looking for a fallback subproject for the dependency gobject-introspection-1.0 because: Use of fallback dependencies is disabled.
../meson.build:31:9: ERROR: Dependency 'gobject-introspection-1.0' is required but not found.
A full log can be found at /tmp/pip-install-rl544h8j/pygobject_254bd89ad42f484a9ca3ff547234af2d/.mesonpy-8wnwhr7s/meson-logs/meson-log.txt [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. (.venv) kl18@DESKTOP-JR92L95:~/lada$
The steps I follow are :
To install and run Lada on Ubuntu, follow these steps:
Update and Install Dependencies:
sudo apt update
sudo apt install -y git wget python3.12 python3.12-venv python3.12-dev
Install FFmpeg and GStreamer:
sudo apt install -y ffmpeg
sudo apt install -y gstreamer1.0-plugins-{base,bad,good} gstreamer1.0-libav
Download the Repository:
git clone https://github.com/ladaapp/lada.git
cd lada
Set Up a Virtual Environment:
python3.12 -m venv .venv
source .venv/bin/activate
Install Dependencies from PyPI:
python -m pip install -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.4/index.html -e ".[basicvsrpp,gui]"
Apply Required Patches:
patch -u ./.venv/lib/python3.12/site-packages/mmagic/__init__.py -i patches/bump_mmagic_mmcv_dependency_bound.patch
patch -u ./.venv/lib/python3.12/site-packages/mmagic/models/editors/vico/vico_utils.py -i patches/fix_diffusers_import.patch
patch -u ./.venv/lib/python3.12/site-packages/mmengine/runner/loops.py -i patches/adjust_mmengine_resume_dataloader.patch
patch -u ./.venv/lib/python3.12/site-packages/mmagic/models/losses/perceptual_loss.py -i patches/enable_loading_vgg19_from_local_file.patch
Download Model Files:
mkdir -p model_weights/3rd_party
wget -P model_weights/ 'https://github.com/ladaapp/lada/releases/download/v0.1.0/lada_mosaic_detection_model.pt'
wget -P model_weights/ 'https://github.com/ladaapp/lada/releases/download/v0.1.0/lada_mosaic_restoration_model_generic.pth'
wget -P model_weights/ 'https://github.com/ladaapp/lada/releases/download/v0.1.0/lada_mosaic_restoration_model_bj_pov.pth'
wget -P model_weights/3rd_party/ 'https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth'
wget -P model_weights/3rd_party/ 'https://download.pytorch.org/models/vgg19-dcbb9e9d.pth'
wget -P model_weights/3rd_party/ 'https://github.com/QualityAssessment/DOVER/releases/download/v0.1.0/DOVER.pth'
wget -P model_weights/ 'https://github.com/ladaapp/lada/releases/download/v0.1.0/lada_nsfw_detection_model.pt'
Run the GUI or CLI:
python lada.py
lada-cli --input "<input video path>" --output "<output video path>"
note: This is an issue with the package mentioned above, not pip. hint: See above for details. (.venv) kl18@DESKTOP-JR92L95:~/lada$
Please check-out latest master / https://github.com/ladaapp/lada/commit/3d752f46e0459099d67e6338ee51b13d7492aa35 I've missed to mention GTK dependency earlier. You can find instructions on their page to install it on Ubuntu This should fix this error you've posted:
../meson.build:31:9: ERROR: Dependency 'gobject-introspection-1.0' is required but not found.
I downloaded successfully all the build dependencies and did the latest master pull with your changes but when i tried to run the programme I am getting this error:
(.venv) kl18@DESKTOP-JR92L95:~/lada$ python lada/gui/main.py
MESA: error: ZINK: failed to choose pdev libEGL warning: egl: failed to create dri2 screen MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen Creating new Ultralytics Settings v0.0.6 file ✅ View Ultralytics Settings with 'yolo settings' or at '/home/kl18/.config/Ultralytics/settings.json' Update Settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. For help see https://docs.ultralytics.com/quickstart/#ultralytics-settings.
(python:3765): Gtk-CRITICAL **: 16:14:25.798: Error building template class 'VideoPreview' for an instance of type 'VideoPreview': .:0:0 Invalid object type 'AdwSpinner'
Traceback (most recent call last):
File "/home/kl18/lada/.venv/lib/python3.12/site-packages/gi/_gtktemplate.py", line 170, in
(python:3765): Gtk-CRITICAL **: 16:14:25.798: Error building template class 'MainWindow' for an instance of type 'MainWindow': .:0:0 Invalid object type 'AdwSpinner'
Traceback (most recent call last):
File "/home/kl18/lada/.venv/lib/python3.12/site-packages/gi/_gtktemplate.py", line 170, in
I am working on it to fix it
The latest GTK Dependencies was installed successfully too
(.venv) kl18@DESKTOP-JR92L95:~/lada$ # Implementation (.venv) kl18@DESKTOP-JR92L95:~/lada$ sudo apt install libadwaita-1-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done libadwaita-1-dev is already the newest version (1.5.0-1ubuntu2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It is suggesting problem is with the call back function
MESA: error: ZINK: failed to choose pdev libEGL warning: egl: failed to create dri2 screen MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen
These logs indicate that there is an issue with MESA / OpenGL driver. You're running this on WSL, right? Maybe you need additional steps to run a GUI on WSL. I found this when googling for OpenGL on WSL, maybe it helps.
No worries I have replaced the OS now to linix mint as I need Linux for my studies
Hi , it's says Linux. Does that mean I need to use Ubuntu on my windows PC on subshell. I currently have
Windows 11, gtx 3060 12GB, I 5 10th gen , 16GB ram
And a MacBook Pro.