본문 바로가기
Issue/HuggingFace

HuggingFace) Unable to import dependency onnxruntime.

by 박채니 2024. 8. 30.

안녕하세요, 코린이의 코딩 학습기 채니 입니다.
개인 포스팅용으로 내용에 오류 및 잘못된 정보가 있을 수 있습니다.

# 상황

HuggingFace에서 사전 학습된 모델을 가져와 프로젝트를 하나 만들려고 했다.

https://huggingface.co/TencentARC/PhotoMaker

 

TencentARC/PhotoMaker · Hugging Face

PhotoMaker Model Card Introduction Users can input one or a few face photos, along with a text prompt, to receive a customized photo or painting within seconds (no training required!). Additionally, this model can be adapted to any base model based on SDXL

huggingface.co

 

위 모델을 사용하려고 하고, 간단하게 말하자면 첨부한 이미지와 프롬프트를 참고하여 새로운 이미지를 생성해준다.

Github에 sample을 따라 실행 중 아래와 같은 오류가 발생했다.

🐛 오류 메세지

Unable to import dependency onnxruntime.

💡 해결방안

$ pip install onnxruntime

정말 간단하게도 onxruntime만 설치해주면 된다!

 

참고 사이트
https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/259