Instructions to use h94/IP-Adapter-FaceID with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use h94/IP-Adapter-FaceID with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("h94/IP-Adapter-FaceID", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
ImportError: cannot import name 'IPAdapterFaceIDXL' from 'ip_adapter.ip_adapter_faceid'
#34
by harshith-7 - opened
I am using the same code provided in ReadMe.md and I am getting this error: "ImportError: cannot import name 'IPAdapterFaceIDXL' from 'ip_adapter.ip_adapter_faceid'". I checked the package as well and IPAdapterFaceIDXL was not present in the .py file.
IP-Adapter/ip_adapter/ip_adapter_faceid.py line 406 assuming you've got an up to date version for the IP-Adapter code.
Try running the code from inside the IP-Adapter directory or adding
sys.path.insert(0,'/path/to/IP-Adapter')
into the python code e.g with the IP-Adaptercode downloaded into/content
sys.path.insert(0,'/content/IP-Adapter')
from ip_adapter.ip_adapter_faceid import IPAdapterFaceIDXL
git clone https://github.com/tencent-ailab/IP-Adapter.git
cd IP-Adapter
nano main.py
# Copy paste the two part code here as a single file, make changes for the image path, prompt, etc. save and exit
python3 main.py
This solves the issue