PhotoMaker icon indicating copy to clipboard operation
PhotoMaker copied to clipboard

cannot import name 'PhotoMakerStableDiffusionXLPipeline'

Open molyswu opened this issue 1 year ago • 5 comments

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!

molyswu avatar Jan 18 '24 06:01 molyswu

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.

Paper99 avatar Jan 18 '24 08:01 Paper99

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.

David-Hoa2023 avatar Jan 21 '24 10:01 David-Hoa2023

Could you please provide more details for us?

Paper99 avatar Jan 21 '24 11:01 Paper99

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)

David-Hoa2023 avatar Jan 21 '24 12:01 David-Hoa2023

Has this issue been resolved?

mtangminghaiguge avatar Feb 27 '24 07:02 mtangminghaiguge