Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Notebook demo can't work #168

Open
MuQY1818 opened this issue Jul 29, 2024 · 2 comments
Open

The Notebook demo can't work #168

MuQY1818 opened this issue Jul 29, 2024 · 2 comments

Comments

@MuQY1818
Copy link

I can not use the updated weight , it cannot be loaded!
what's wrong?
屏幕截图 2024-07-29 103715

@MuQY1818
Copy link
Author

Ohi deal with it, I use the v1 parameters.However, I use v2 model ,thx

@AyushRanjan15
Copy link

AyushRanjan15 commented Sep 24, 2024

I experienced the same issue. The things works but the default values in the 'photomaker_demo.ipynb' does not work by itself.

In the

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

The photomaker_ckpt is using v1 values

pipe = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
    base_model_path,
    torch_dtype=torch.bfloat16,
    use_safetensors=True,
    variant="fp16",
).to(device)

pipe.load_photomaker_adapter(
    os.path.dirname(photomaker_ckpt),
    subfolder="",
    weight_name=os.path.basename(photomaker_ckpt),
    trigger_word="img"
)

Uses v2 by default. This leads the error.

Snippent from photomaker/pipeline.py


class PhotoMakerStableDiffusionXLPipeline(StableDiffusionXLPipeline):
    @validate_hf_hub_args
    def load_photomaker_adapter(
        self,
        pretrained_model_name_or_path_or_dict: Union[str, Dict[str, torch.Tensor]],
        weight_name: str,
        subfolder: str = '',
        trigger_word: str = 'img',
        **pm_version: str = 'v2',**
        **kwargs,
    ):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants