Open ThomasHezard opened 3 months ago
Also having this issue.
I also prompted this error, but just install these two libraries. python.exe -m pip install onnxruntime-gpu
Try the demo scripts in this folder: https://github.com/TencentARC/PhotoMaker/tree/main/inference_scripts
Try the demo scripts in this folder: https://github.com/TencentARC/PhotoMaker/tree/main/inference_scripts
After fixing inference_pmv2.py
l.46 and l.48 (photomaker_variable
should be photomaker_ckpt
), the script runs fine.
[EDIT]
After some digging, I found that there is a gradio_demo/app_v2.py
script, this one rune after installing all the necessary dependencies (requirements.txt, git+https://github.com/TencentARC/PhotoMaker.git, einops, onnxruntime-gpu)
One question: a lot of download happens at the first start of the demo, is there any way to download all dependencies in advance with a bash or python script?
Also having this issue.
same issue
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,
):
Hello,
After #157 resolution, I finally tested gradio demo and tried to have fun with the model in notebooks.
I had issues with both... 😕
Gradio demo
After a few missing dependencies (
einops
andonnxruntime
), I managed to start the demo. However, with examples from the demo or my own images, I have the following error at each inference:Notebook demo
With instantiating the pipeline in the notebook demo, or in my own script/notebook using the code example, using
hf_hub_download
or downloading the model manually, I have the following error:Question
Any idea how to make it work? Is there something I did wrong?