PhotoMaker icon indicating copy to clipboard operation
PhotoMaker copied to clipboard

cannot import name 'FacePerceiverResampler'

Open tom729 opened this issue 1 year ago • 2 comments

python inference_scripts/inference_pmv2.py Traceback (most recent call last): File "/Users/tangzhenhua/Downloads/lab/PhotoMaker/inference_scripts/inference_pmv2.py", line 10, in from photomaker import PhotoMakerStableDiffusionXLPipeline File "/Users/tangzhenhua/miniconda3/envs/photomaker/lib/python3.10/site-packages/photomaker/init.py", line 2, in from .model_v2 import PhotoMakerIDEncoder_CLIPInsightfaceExtendtoken File "/Users/tangzhenhua/miniconda3/envs/photomaker/lib/python3.10/site-packages/photomaker/model_v2.py", line 9, in from . import FacePerceiverResampler ImportError: cannot import name 'FacePerceiverResampler' from partially initialized module 'photomaker' (most likely due to a circular import) (/Users/tangzhenhua/miniconda3/envs/photomaker/lib/python3.10/site-packages/photomaker/init.py)

tom729 avatar Jul 25 '24 02:07 tom729

Try this line from .resampler import FacePerceiverResampler

Paper99 avatar Jul 25 '24 03:07 Paper99

See https://github.com/TencentARC/PhotoMaker/issues/157, the commit from a few hours ago fixed it

ThomasHezard avatar Jul 25 '24 16:07 ThomasHezard