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

Powerpaint V2 Not Starting #38

Closed RFedz007989 closed 1 week ago

RFedz007989 commented 1 month ago

Hi,

I am getting this error when starting Powerpaint V2 : (python gradio_PowerPaint_BrushNet.py)

Kindly check this error.

(C:\Powerpaint\PowerPaint>python gradio_PowerPaint_BrushNet.py C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. torch.utils._pytree._register_pytree_node( A matching Triton is not available, some optimizations will not be enabled Traceback (most recent call last): File "C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\xformers__init__.py", line 55, in _is_triton_available from xformers.triton.softmax import softmax as triton_softmax # noqa File "C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\xformers\triton\softmax.py", line 11, in import triton ModuleNotFoundError: No module named 'triton' C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. torch.utils._pytree._register_pytree_node( Traceback (most recent call last): File "C:\Powerpaint\PowerPaint\gradio_PowerPaint_BrushNet.py", line 14, in from utils.utils import TokenizerWrapper, add_tokens File "C:\Powerpaint\PowerPaint\utils\utils.py", line 9, in from mmagic.utils import try_import ModuleNotFoundError: No module named 'mmagic')

Thank You

danielscos commented 1 month ago

You don't have the mmagic module. Run : pip install mmagic

RFedz007989 commented 1 month ago

You don't have the mmagic module. Run : pip install mmagic

Thanks, I installed, as you said, but after that I got this below mentioned error. Pls check.

(C:\Powerpaint\PowerPaint>python gradio_PowerPaint_BrushNet.py C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. torch.utils._pytree._register_pytree_node( A matching Triton is not available, some optimizations will not be enabled Traceback (most recent call last): File "C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\xformers__init__.py", line 55, in _is_triton_available from xformers.triton.softmax import softmax as triton_softmax # noqa File "C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\xformers\triton\softmax.py", line 11, in import triton ModuleNotFoundError: No module named 'triton' C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. torch.utils._pytree._register_pytree_node( Traceback (most recent call last): File "C:\Powerpaint\PowerPaint\gradio_PowerPaint_BrushNet.py", line 14, in from utils.utils import TokenizerWrapper, add_tokens File "C:\Powerpaint\PowerPaint\utils\utils.py", line 9, in from mmagic.utils import try_import File "C:\Users\vkark\AppData\Local\Programs\Python\Python310\lib\site-packages\mmagic__init__.py", line 35, in assert (mmcv_min_version <= mmcv_version < mmcv_max_version), \ AssertionError: mmcv==2.0.0rc4 is used but incompatible. Please install mmcv-full>=[2, 0, 0], <[2, 2, 0]

Thank You

danielscos commented 1 month ago

Run pip uninstall mmcv, and then run pip install mmcv ==2.0.0

danielscos commented 1 month ago

You really don't need people to solve this for you. Just look at the end of the log, it says a certain module isn't installed or is not the correct version, and just install the module yourself lol

RFedz007989 commented 1 month ago

I asked this here, as I was getting the same error again & again of this even after installing via pip (AssertionError: mmcv==2.0.0rc4 is used but incompatible. Please install mmcv-full>=[2, 0, 0], <[2, 2, 0] )

Now also after again uninstall & install via PIP, still getting the same error mention above.

Thank You

lijiaxing0213 commented 1 month ago

@RFedz007989 How about specifying these library versions? My environment is set up like this:

mmagic: 1.2.0 mmcv: 2.1.0 mmengine: 0.10.3

The installation process reported no errors. For reference, you can check the documentation: https://mmcv.readthedocs.io/en/latest/get_started/installation.html

zengyh1900 commented 1 week ago

Hi @RFedz007989,

Thanks for your attention. Are you using PowerPaint from this repo directly? I have installed and checked it again. I think we don't need to install mmcv, mmagic and mmengine.

BTW, we have updated the readme and refactored the codes to make it clear. Please check it and any feedback are welcome :)