-
Notifications
You must be signed in to change notification settings - Fork 95
How to use the GPU in the application
Enhance the performance and speed of operations in the Wunjo AI application by harnessing the power of your GPU. To achieve this, you need to install NVIDIA CUDA drivers. This guide will help you with the installation process on various operating systems.
Ensure that your system meets the following requirements before installing CUDA:
- NVIDIA GPU (Kepler architecture or newer)
- A supported version of Windows, Ubuntu, or macOS (note that macOS support is limited; refer to NVIDIA’s documentation for detailed information)
- Minimum of 8GB RAM (16GB or more recommended)
For the best compatibility and performance, we recommend installing CUDA 11.8.
Follow the instructions below to install CUDA on your operating system:
- Visit the NVIDIA CUDA Toolkit download page or NVIDIA CUDA Toolkit 11.8.
- Choose the appropriate version for your system and download the installer.
- Run the installer and follow the on-screen instructions to complete the installation.
- Restart your system to finalize the installation.
-
Open your terminal and update your repository and install the necessary dependencies using the following commands:
sudo apt update sudo apt install build-essential dkms
-
Go to the NVIDIA CUDA Toolkit download page.
-
Select "Linux" and choose the right options for your system to get the installation commands.
-
Execute the provided commands in your terminal to install CUDA.
-
Restart your system to complete the installation.
NVIDIA has discontinued support for CUDA on macOS from CUDA 10.2 onwards. Users with macOS are recommended to explore NVIDIA's alternatives such as OpenCL. Further details are available on the official PyTorch page.
To use the GPU in the Wunjo AI application on Windows, you need to rebuild the build because the default is set up for CPU usage. Here is how you can set it up:
-
Clone the project:
git clone https://github.com/wladradchenko/wunjo.wladradchenko.ru.git
-
Ensure you have the necessary tools installed:
-
Set up a virtual environment:
python -m venv venv venv\Scripts\activate.bat
-
Install dependencies:
python -m pip install --upgrade pip python -m pip install --upgrade setuptools python -m pip install --upgrade wheel python -m pip install -r requirements_gpu.txt python -m pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 python -m pip install xformers==0.0.19
-
Verify CUDA installation:
After installing the torch libraries, check that CUDA has installed correctly. Open your Python environment and run the following script:
python
import torch if torch.cuda.is_available(): print("CUDA is available") else: print("CUDA is not available")
You should see the message "CUDA is available" if everything is set up correctly.
-
Navigate to the portable folder:
cd portable
-
Development mode:
To run in development mode, use the command:
briefcase dev
-
Building the application:
-
To build:
briefcase build
Please note that on Windows the following errors may occur after the build:
'NoneType' object has no attribute 'flush'
To fix it, you need to remove the line
_default_handler.flush = sys.stderr.flush
inwunjo/app/src/app_packages/transformers/utils/logging.py
.Torch after the briefcase build was installed only for the CPU. Need to copy from venv torch and torchvision and replace torch and torchvision in
wunjo/app/src/app_packages/
-
To run:
briefcase run
-
To package:
briefcase package
Note that creating a larger installer might encounter issues due to the 2GB size limit for MSI installers on Windows. Hence, we officially distribute only the CPU version for Windows.
-
If you are unable to build an application for the GPU, take a look at the solution to common problems Issue 28.
The Ubuntu application is naturally compatible with GPU libraries. Open the application, activate the GPU switch , and you should see a message indicating that the GPU has been activated.
Due to the lack of driver support on macOS, you are limited to using the CPU. However, you can modify the application for use with OpenCL alternatives.
For last versions CUDA12.x, cuDNN9.x, xformers, torch, torchaudio and torchvision, you can install flash-attn to improve performance.
MAX_JOBS=4 pip install flash-attn
- Home
- English
- How to install the application
- How to change the default directory for the .wunjo folder
- How to add another application language
- Speech documentation
- How manually install model for text to speech
- How to synthesize text to speech
- How to clone a voice
- How to translate speech to text
- Deepfake documentation
- How to manually set models for deepfake animation of the face and lips
- How to animate a face from an image
- How to animate lip movement under audio
- How to face swap target video face on source face from photo
- How to use retouch to improve quality deepfake or remove object
- How to get segmentation mask
- How to use deepfake emotion
- How to use video editor tools
- Diffusion documentation
- How use video to video by text prompt
- How to use the GPU in the application
- File is too big
- Support the Project
- Acknowledgements
- Author
- Русский
- Как установить приложение
- Как изменить директорию по умолчанию для папки .wunjo
- Как добавить другой язык приложения
- Документация по речи
- Как вручную установить модель преобразования текста в речь
- Как синтезировать речь из текста
- Как клонировать голос
- Как перевести речь в текст
- Документация по дипфейкам
- Как вручную установить модели для дипфейка анимации лица и губ
- Как анимировать лицо из изображения
- Как анимировать движение губ под аудио
- Как поменять лицо целевого видео на исходное лицо с фотографии
- Как использовать ретушь для улучшения качества дипфейка или удаления объектов с видео
- Как получить маску объектов
- Как изменить эмоции человека на видео
- Как использовать инструменты видеоредактора
- Документация по diffusion
- Как изменить видео текстовым запросом
- Как использовать GPU в приложении
- Файл слишком большой
- Поддержите проект
- Благодарности
- Автор