TencentARC / PhotoMaker

PhotoMaker
https://photo-maker.github.io/
Other
8.63k stars 676 forks source link

cannot import name 'PhotoMakerStableDiffusionXLPipeline' #54

Open molyswu opened 5 months ago

molyswu commented 5 months ago

python3 gradio_demo/aap.py

python=3.10

pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118

Error as flower: Traceback (most recent call last): File "/home/vb/PhotoMaker-main/gradio_demo/app.py", line 13, in from photomaker import PhotoMakerStableDiffusionXLPipeline ImportError: cannot import name 'PhotoMakerStableDiffusionXLPipeline' from 'photomaker' (/home/vb/anaconda3/envs/photomaker/lib/python3.10/site-packages/photomaker/init.py)

Thanks!

Paper99 commented 5 months ago

Now, you could update the environment building through:

conda create --name photomaker python=3.10
pip install -U pip

# Install requirements
pip install -r requirements.txt

# Install photomaker
pip install git+https://github.com/TencentARC/PhotoMaker.git

Then you can run the following command to use our PhotoMaker:

from photomaker import PhotoMakerStableDiffusionXLPipeline

The previous line can also be used outside the repo.

David-Hoa2023 commented 5 months ago

Now, you could update the environment building through:

conda create --name photomaker python=3.10
pip install -U pip

# Install requirements
pip install -r requirements.txt

# Install photomaker
pip install git+https://github.com/TencentARC/PhotoMaker.git

Then you can run the following command to use our PhotoMaker:

from photomaker import PhotoMakerStableDiffusionXLPipeline

The previous line can also be used outside the repo.

Same error. Your code does not work. Please help.

Paper99 commented 5 months ago

Could you please provide more details for us?

David-Hoa2023 commented 5 months ago

Could you please provide more details for us?

The issue is described and solved here: https://github.com/TencentARC/PhotoMaker/issues/22#:~:text=I%20had%20to%20put,be%20an%20empty%20file)

mtangminghaiguge commented 4 months ago

Has this issue been resolved?