This repository facilitates the establishment of an AI Parrot Host, enabling tasks ranging from image, video, and audio generation to the utilization of Large Language Models (LLMs) and LoRa training. It offers the capability to set up and manage Generate AI models for a diverse array of applications.
This project requires a setup that meets the following criteria to ensure stable and efficient operation.
-
Python: Version 3.10. Ensure that Python is properly installed and configured on your system. Use the command
python --versionto check your current Python version. -
CUDA: Version 12.1 or compatible.
- Use the command
nvcc --versionin the terminal to check your current CUDA version. If you do not have CUDA installed, or if it's not version 12.1, please visit NVIDIA's official website to download and install CUDA 12.1.
- Use the command
-
G++ compiler is required.
- To check the current version of G++ installed, open a terminal and type
g++ --version. If G++ is not installed on your system, you will need to install it via your operating system's package manager.
- To check the current version of G++ installed, open a terminal and type
-
GPU: If your system includes a GPU, should have at least 12GB VRAM for image generation tasks, 48GB VRAM for video generation tasks, and 16GB VRAM for LoRA Training tasks and LLMs.
- You can use a tool like
nvidia-smion systems with NVIDIA GPUs to check VRAM capacity.
- You can use a tool like
git clone https://github.com/parrotnetwork/parrot-host.git
cd parrot-host
pip install -r requirements.txtContinue with the Basic Usage instructions
- Download the zipped version
- Extract it to any folder of your choice
- Continue with the Basic Usage instructions
- Login and get your TOKEN
python get_token_and_create_env.py --username <your_user_name> --password <your_password> - This project supports three types of tasks with Parrot Host
-
Image Generation
parrot_sd_taskparrot_sdxl_taskparrot_sdxl_lightning_task
-
Video Generation
parrot_txt2vid_damo_task
-
Text Generation
parrot_llm_gemma_7b_task
-
LoRA Train
parrot_lora_trainer_task
In the terminal in which it's running
CUDA_VISBLE_DEVICES=0 sh scripts/parrot_{task_type}.shOr
CUDA_VISBLE_DEVICES=0 python server.py- Open file .env and uncomment the line: ENABLED_TASKS = "parrot_sdxl_lightning_task"
- You can change parrot_sdxl_lightning_task into other tasks.
- Run
python server.pyto start server.
- In the terminal in which it's running, simply press
Ctrl+Ctogether. - The worker will finish the current jobs before exiting.
To start using the Parrot Host service, you first need to pull the Docker image from the Docker Hub
docker pull parrotnetwork/parrot-worker:base-1.0-sd15-sdxl-loradocker compose builddocker compose up -ddocker compose down