YueGP 빌드하기

conda create -n YueGP -y python==3.11.3
conda activate YuEGP
git clone https://github.com/deepbeepmeep/YuEGP.git
cd YuEGP
git lfs install
cd inference/
git clone https://huggingface.co/m-a-p/xcodec_mini_infer
pip install pandas pydantic
pip install timm>=1.0.17
pip install aiofiles==23.2.1
pip install matplotlib
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
pip install https://github.com/kingbri1/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu124torch2.6.0cxx11abiFALSE-cp311-cp311-win_amd64.whl
pip install xformers==0.0.29.post3 --index-url=https://download.pytorch.org/whl/cu124
pip install https://github.com/woct0rdho/triton-windows/releases/download/v3.1.0-windows.post9/triton-3.1.0-cp311-cp311-win_amd64.whl
pip install huggingface_hub[hf_xet]
pip install https://github.com/woct0rdho/SageAttention/releases/download/v2.1.1-windows/sageattention-2.1.1+cu126torch2.6.0-cp311-cp311-win_amd64.whl
pip install "huggingface_hub[cli]"
cd ..
pip install -r requirements.txt
cd inference
python gradio_server.py --profile 5 --sdpa



YuEGP\inference\gradio_server.py 에서 135번째 라인 쯤에 다음과 같이 수정한다.

# line 135
수정 전
# line 135
parameter_dict = torch.load(args.resume_path, map_location='cpu')
#수정 후
parameter_dict = torch.load(args.resume_path, map_location='cpu', weights_only=False)

cd inference
python gradio_server.py --profile 3 --sdpa
#프로파일 1(RAM 16GB 이상)을 사용하여 스테이지 속도를 두 배로 높이는 새로운 실험용 터보 #스테이지 2를 시도해 볼 수 있습니다. 하지만 이것이 생성된 곡의 품질에 어떤 영향을 미치는#지는 확실하지 않습니다.
python gradio_server.py --profile 1 --turbo-stage2

거의 30분 이상 걸린거 같다.