PhotoMaker icon indicating copy to clipboard operation
PhotoMaker copied to clipboard

Installation instructions / Repository not found in HuggingFace

Open amelio-vazquez-reina opened this issue 1 year ago • 6 comments

Hi folks! The example notebooks [require]:(https://github.com/TencentARC/PhotoMaker/blob/main/photomaker_demo.ipynb)

from photomaker.pipeline import PhotoMakerStableDiffusionXLPipeline

Installing from the repository doesn't work:

!pip install git+https://github.com/TencentARC/PhotoMaker.git

ERROR: git+https://github.com/TencentARC/PhotoMaker.git does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

I guess the solution is to just download the repo and use PYTHONPATH?

But if so, what about the bin files? E.g. I run this from HuggingFace:

from huggingface_hub import hf_hub_download
photomaker_ckpt = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model")

but I get this error:

401 Client Error: Unauthorized for url:
https://huggingface.co/release_model/resolve/main/photomaker-v1.bin

amelio-vazquez-reina avatar Jan 15 '24 20:01 amelio-vazquez-reina

I have the same problem : My guess is that didn't yet get merged into the transformers pipeline, it's a huge repo that takes time.

ilisparrow avatar Jan 15 '24 20:01 ilisparrow

Got it @ilisparrow . Are you getting this error? Or something else?

image

amelio-vazquez-reina avatar Jan 15 '24 20:01 amelio-vazquez-reina

Hello, I didn't use the notebook but followed the pure python instructions. It said that it was not able to find photo.maker from photomakerPipeline

ilisparrow avatar Jan 15 '24 21:01 ilisparrow

The correct syntax is the following unless you download the model directly from the hugging face repo here: https://huggingface.co/TencentARC/PhotoMaker/tree/main, in which case the notebook suggests placing the .bin file in the model_release local directory.

# Load PhotoMaker checkpoint
pipe.load_photomaker_adapter(
    "TencentARC/PhotoMaker",
    weight_name="photomaker-v1.bin",
    trigger_word="img"
)  

steverhoades avatar Jan 16 '24 00:01 steverhoades

Hello, I didn't use the notebook but followed the pure python instructions. It said that it was not able to find photo.maker from photomakerPipeline

Hello @ilisparrow, first of all, thank you for your discussion, which helped us fix many known issues in environment construction (in the latest version).

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 17 '24 09:01 Paper99

The correct syntax is the following unless you download the model directly from the hugging face repo here: https://huggingface.co/TencentARC/PhotoMaker/tree/main, in which case the notebook suggests placing the .bin file in the model_release local directory.

# Load PhotoMaker checkpoint
pipe.load_photomaker_adapter(
    "TencentARC/PhotoMaker",
    weight_name="photomaker-v1.bin",
    trigger_word="img"
)  

Hi, @steverhoades, does this problem still exist?

Paper99 avatar Jan 17 '24 09:01 Paper99