validate_repo_id HFValidationError
validate_repo_id raise HFValidationError( huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: './stable-diffusion-v1-5-512-finetuned-epoch10'.`
프로젝트 중 팀원이 파인튜닝한 Stable-Diffusion 모델 파일을 받아서 로컬에서 돌릴려 하였는데 이러한 에러 로그가 남았다.
pipe = DiffusionPipeline.from_pretrained(
r"./logo_model/stable-diffusion-v1-5-512-finetuned-epoch10",
torch_dtype=torch.float16
)
알고보니 파이프 라인으로 모델을 가져오는데 로컬에서 지정한 경로에 없으면 허깅페이스 에서 해당 이름으로 찾는것이였고, 내 경우 잘못된 상대경로를 지정하였기에 발생하였다.
로컬 사용시 올바른 상대경로를 지정해주자
PyTorch 모델 실행 후 진행 0% 현상

CNN같은 이미지 분류기는 잘됐는데 안되서 삽질을 하다가
알고보니 CUDA 코어를 사용해야하고, CUDA 코어가 있는 그래픽카드가 있다고 하더라도 CUDA 툴킷을 설치해야한다.
우선 CUDA 버전이 몇인지 알아보자
https://en.wikipedia.org/wiki/CUDA#GPUs_supported


CUDA - Wikipedia
From Wikipedia, the free encyclopedia Parallel computing platform and programming model In computing, CUDA is a proprietary[1] parallel computing platform and application programming interface (API) that allows software to use certain types of graphics pro
en.wikipedia.org
위 위키에서 자신의 그래픽 카드 명을 Ctrl + F 로 찾는다.

맨 왠쪽이 버전을 보고

표의 초록색 부분으로 된 영역에 방금 본 버전이 범위 내라면 그 행의 쿠다 버전을 설치하면 된다.
이제 CUDA ToolKit을 깔아볼까 싶지만
pytorch에서 Cuda 드라이버와 Pytorch에 필요한 CUDA 라이브러리를 설치하게끔 간편한 서비스를 제공한다.
https://pytorch.org/get-started/locally/
Start Locally
Start Locally
pytorch.org
위 사이트에 가서 자신의 현재 쿠다 버전과 운영체제, 패키지를 선택한 후 명령어를 입력해주면 설치된다.

설치후 아주 잘 실행되었다!!
'문제해결' 카테고리의 다른 글
IncorrectResultSetColumnCountException - JdbcTemplate (0) | 2024.08.17 |
---|---|
크롬 개발자도구(f12) network 빈 화면 나오는 현상 (0) | 2024.08.17 |
python mod_wsgi-express module-config 오류 (0) | 2023.11.02 |