open-mmlab / PowerPaint

[ECCV 2024] PowerPaint, a versatile image inpainting model that supports text-guided object inpainting, object removal, image outpainting and shape-guided object inpainting with only a single model. 一个高质量多功能的图像修补模型,可以同时支持插入物体、移除物体、图像扩展、形状可控的物体生成,只需要一个模型
https://powerpaint.github.io/
MIT License
565 stars 36 forks source link

Not able to set up app.py #89

Closed kevnantony closed 2 hours ago

kevnantony commented 3 hours ago

Hi Guys, thank you developing this awesome project. When I'm trying to run app.py I am getting the following error:

Traceback (most recent call last):
  File "/home/ubuntu/PowerPaint/app.py", line 560, in <module>
    controller = PowerPaintController(weight_dtype, args.checkpoint_dir, args.local_files_only, args.version)
  File "/home/ubuntu/PowerPaint/app.py", line 111, in __init__
    load_model(self.pipe.unet, os.path.join(checkpoint_dir, "unet/unet.safetensors"))
  File "/home/ubuntu/PowerPaint/ppt/lib/python3.10/site-packages/safetensors/torch.py", line 202, in load_model
    state_dict = load_file(filename, device=device)
  File "/home/ubuntu/PowerPaint/ppt/lib/python3.10/site-packages/safetensors/torch.py", line 313, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
FileNotFoundError: No such file or directory: "./checkpoints/ppt-v1/unet/unet.safetensors"

I am a newbie. Could someone guide me how to fix this?

zengyh1900 commented 3 hours ago

Hi @kevnantony thanks for your interest. According to the error message, you need to first download related model weights to the specified path.

kevnantony commented 2 hours ago

Much appreciated, I was able to set it up.