기본 콘텐츠로 건너뛰기

Bark 로 음성을 만들어보자, (내 컴퓨터에서)


YouTube 를 보다 Bark 라는 OpenSource 프로젝트를 알게 되어, 내 컴퓨터에서도 돌려볼까 라는 간단하게 생각하고 시작 했다 .

README를 보니

PYTORCH 2.0+ 과 CUDA 11.7 과 CUDA 12.0에서 테스트해보았다고 한다.

초기 CUDA나왔을때 관심을 가지고 NVIDIA 개발자로 등록하고 회사에서는 1050 설치가되어 있는 노트북에서 nvidia 개발툴킷 설치도 하고 이런 저런 샘플을 돌려봤는데 집 데스크탑에서는 아예 CUDA 툴킷자체가 설치가 되어 있지 않았다.

NVIDIA 그래픽 드라이버와 별개로  CUDA ToolKit를 설치해야 한다.

글을 쓰는 시간 기준으로 NVIDIA CUDA TOOLKiT을 설치하면 12.1가 설치된다.
느낌적인 느낌이지만 아마도 11.7을 더 많이 테ㅅ트하고 문제가 없을것 같아 아카이브를 찾아서 11.7로 재설치해야했다. 혹시나해서 12.0도 설치하지 않고 다운은 받아둔다.

PYTORCH도 기존에서 Stable diffusion 때문에 설치되어 있는게 TORCH 2.0.1 인데
BARK때문에 설치한것 패키지는 2.0.0을 원하는 호환문제로 재설치해야했다.

설치해서 구동해서 보니 속도가 처참하게 느려서 GPU를 활용하지 못하는 CPU 버젼이라 CUDA 버젼으로 재설치해야했다. 휴일 시간이 참 잘간다

이러저래 삽질한 후에 설치 후 구동해보고 



Bark Project Issue 쪽에 필요한 쪽 정보를 올려둔다👄

  • https://github.com/suno-ai/bark/issues/202#issuecomment-1537189433
  • https://github.com/suno-ai/bark/issues/202#issuecomment-1537192524

---

cuda Download link
https://developer.nvidia.com/cuda-downloads

torch Download Link
https://download.pytorch.org/whl/torch/
pip install torch==2.0.0+cu117 -f https://download.pytorch.org/whl/cu117/torch_stable.html


tourchaudio tourch audio,vision downloadLink

https://download.pytorch.org/whl/torchaudio/
https://download.pytorch.org/whl/torchvision/

If you're using python 3.10 and torch 2.0, you can use
torchaudio-2.0.0+cu117-cp310-cp310-win_amd64.whl
torchvision-0.15.1+cpu-cp310-cp310-win_amd64.whl



 pip install torch==2.0.0+cu117 -f https://download.pytorch.org/whl/cu117/torch_stable.html
Looking in links: https://download.pytorch.org/whl/cu117/torch_stable.html
Collecting torch==2.0.0+cu117
  Using cached https://download.pytorch.org/whl/cu117/torch-2.0.0%2Bcu117-cp310-cp310-win_amd64.whl (2343.6 MB)
Requirement already satisfied: filelock in c:\python310\lib\site-packages (from torch==2.0.0+cu117) (3.12.0)
Requirement already satisfied: typing-extensions in c:\python310\lib\site-packages (from torch==2.0.0+cu117) (4.5.0)
Requirement already satisfied: sympy in c:\python310\lib\site-packages (from torch==2.0.0+cu117) (1.12rc1)
Requirement already satisfied: networkx in c:\python310\lib\site-packages (from torch==2.0.0+cu117) (3.1)
Requirement already satisfied: jinja2 in c:\python310\lib\site-packages (from torch==2.0.0+cu117) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in c:\python310\lib\site-packages (from jinja2->torch==2.0.0+cu117) (2.1.2)
Requirement already satisfied: mpmath>=0.19 in c:\python310\lib\site-packages (from sympy->torch==2.0.0+cu117) (1.3.0)
Installing collected packages: torch
Successfully installed torch-2.0.0+cu117

D:\VDisk\Bark>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:59:34_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0

D:\VDisk\Bark>python
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print("Torch version:", torch.__version__)
Torch version: 2.0.0+cu117
>>> print("CUDA available:", torch.cuda.is_available())
CUDA available: True
>>> print("Number of GPUs:", torch.cuda.device_count())
Number of GPUs: 1


메모리 부족해서 동작중 에러가 발생하고 이게 pytorch를 운용하는 경우 빈번하게 발생하는 것인지 검색과 ChatGPT로 검색이 되는게 있었고 이중에 여러가지 조언이 있었는데 막상 Win10환경에서 유효한 것은 구동하기전에 "공백없이" 정확히 환경변수를 설정하는것이었다.


D:\VDisk\Bark>set SUNO_USE_SMALL_MODELS=True

D:\VDisk\Bark>python main.py
100%|████████████████████████████████████████████████████████████████████████████████| 100/100 [00:01<00:00, 87.93it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 13/13 [00:03<00:00,  3.82it/s]

댓글

이 블로그의 인기 게시물

DELL의 새게이밍 노트북, Inspiron 15 7000 Gaming, Dual Display 문제

Dell New 게이밍노트북 7567  I7 Notebook http://www.dell.com/kr/p/inspiron-15-7567-laptop/pd?ref=PD_OC 7th Generation Intel® Core™ i7 프로세서 8GB 메모리 1TB 하드 드라이브 + 128GB 솔리드 스테이트 드라이브 NVIDIA® GeForce® GTX 1050 Ti (4GB GDDR5 그래픽 메모리 포함) 상세 사양 리눅스 개발환경이 필요해서 여러대 구매한 노트북입니다. 기본적으로 ubuntu 16.04 가 설치되어 있는데, 필요한 개발환경이 ubuntu 이고 별도의 windows 개발용 PC가 있기 때문에 구매를 결정하게 되었습니다. Slim하지 않지만 I7 HQ CPU와 1050TI spec 이 결정하는데 주요했고, 받은 후에 빌드환경 구축후 8 thread compile을 만끽하던중 치명적인 문제를 Display쪽 문제를 발견하고, Dell express 쪽과 전화통화도 하고 문의 메일도 보내서 지원을 받고(진행)중입니다. 추가 :  시간낭비하지 말라고 중간에 업데이트합니다.  해결되었고, 해결방법은  Windows 을 설치한 후 Fn+F8을 눌러서 모드를 확장모드를 선택합니다. 디스플레이 설정이나 드라이버 재설치 같은 방법으로는 조정이 불가능했습니다. --------------------------------------------------------------------- 요즘 다들 Dual monitor 환경일텐데, Dual Monitor를 복제형태로만 지원을 합니다. 14.04 설치후 업데이트시 375.66 Driver가 설치됩니다. nVidia driver가 설치되었으나, 모니터 인식에 문제가 있어서 해상도 확장설정자체를 할 수 없습니다. 기본 ubuntu라서 driver 문제인가 확인하기 위해서 우분투 64bit 환경 NVIDIA...

우분투에서 성가신 자동 실행 처리

우분투운서비스는 종료된지 예전인데 script에 남아 있어서 항상 실행된다 apt-get 패키지가 제거되어도 etc/xdg/autostart 폴더에서 삭제해야 실행되지 않는다. /etc/xdg/autostart$ ls at-spi-dbus-bus.desktop              gnome-settings-daemon.desktop                print-applet.desktop bluetooth-applet-unity.desktop       gnome-sound-applet.desktop                   pulseaudio-kde.desktop bluetooth-applet.desktop             gnome-user-share.desktop                     pulseaudio.desktop deja-dup-monitor.desktop             gsettings-data-convert.desktop               telepathy-indicator.desktop gdu-notification-daemon.desktop      gwibber.desktop                             ...

llama 계열 gguf 제공되는 경우 가져와서 사용하는 예제

llama 계열의 모델이 친절하게 gguf 형태로 제공되는 경우 어떻게 다운받고 어떻게 ollama에 추가하는지 예전에 gguf 파일을 등록하는 유튜브 강의를 보고 메모해두것을 기반으로 2024년 12월31일 추운 겨울 밤 기억을 백업해 봅니다 수동으로 작성한 것은 지우고 copilot으로 포맷을 정리해서 업데이트합니다. Bllossom/llama-3.2-Korean-Bllossom-3B-gguf-Q4_K_M 한국어 모델 추가하기 시작 : MS Copilot과의 질의응답 중 llama 3.2 기반의 한국어 학습 모델을 발견. 현재 사용 모델 : EEVE-Korean-10.8B (약 7.7 GB) 모델 사용 중. llama 3.2 기반 한국어 모델 소개 : 모델 설명 링크 gguf 파일 다운로드 링크 deepseek-ai/DeepSeek-R1-Distill-Qwen-7B  기반 한국어 모델 소개 : 모델 설명 링크 gguf 파일 다운로드 링크 모델 설정 파일 (Modelfile) : FROM llama-3.2-Korean-Bllossom-3B-gguf-Q4_K_M.gguf PARAMETER temperature 0.6 PARAMETER top_p 0.9 TEMPLATE """<|start_header_id|>system<|end_header_id|> Cutting Knowledge Date : December 2023 {{ if .System }}{{ .System }} {{- end }} {{- if .Tools }} When you receive a tool call response, use the output to format an answer to the orginal user question. You are a helpful assistant with tool calling capabilities. {{- end }} <|eot_id|> {{- range $i , $_ := .Messa...