TencentARC / PhotoMaker

PhotoMaker [CVPR 2024]
https://photo-maker.github.io/
Other
9.58k stars 768 forks source link

Getting issue while loading textual embeddings #183

Open vedant123454 opened 2 months ago

vedant123454 commented 2 months ago

We want to use photomaker with textual embeddings. We are using following code to load the textual embeddings

pipe.load_textual_inversion("./some_model.pt", token="some_text")

But getting error

Traceback (most recent call last):
  File "create_personalized.py", line 196, in <module>
    images = pipe(
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/photomaker/pipeline.py", line 336, in __call__
    ) = self.encode_prompt_with_trigger_word(
  File "/opt/conda/lib/python3.8/site-packages/photomaker/pipeline.py", line 176, in encode_prompt_with_trigger_word
    raise ValueError(
ValueError: PhotoMaker currently does not support multiple trigger words in a single prompt.                            Trigger word: img, Prompt: A single female wide angle shot of  pixar animation character of a photo of adult age female   wearing plain tshirt of A single female front-facing cartoon  upper torso running towards the viewer, waving hand in the air in pixar character style of adult age img age with a gentle smile expression, pixar-style, studio anime, Disney, high-quality.
abdul756 commented 2 months ago

Am also facing the same issue please help