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
364 stars 18 forks source link

In the image outputting function, the following code will cause the returned image to become smaller and blurry #51

Closed hjj-lmx closed 1 week ago

hjj-lmx commented 1 week ago

In the image outputting function, the following code will cause the returned image to become smaller and blurry

if size1 < size2: input_image["image"] = input_image["image"].convert("RGB").resize((512, int(size2 / size1 512))) else: input_image["image"] = input_image["image"].convert("RGB").resize((int(size1 / size2 512), 512))

If deleted, the incoming image pixels will be too large and the generation speed will be slow

Is there any solution

zengyh1900 commented 1 week ago

Hi @hjj-lmx,

thanks for interest. Yes, it is hard to manage resolution and runtime speed at the same time. You may use less sampling steps and more advanced sampler or deployment tricks to accelerate it, which is currently not supported in our project.