Mask2Background icon indicating copy to clipboard operation
Mask2Background copied to clipboard

AttributeError: 'NoneType' object has no attribute 'width' - error fter push CREATE MASK

Open eastone11 opened this issue 2 years ago • 7 comments

version:  •  python: 3.10.10  •  torch: 2.0.0+cu118  •  xformers: 0.0.20  •  gradio: 3.29.0  •  checkpoint: [c54f90e540]

File "c:\Temp__programs\Stable Def\venv\lib\site-packages\gradio\routes.py", line 408, in run_predict output = await app.get_blocks().process_api( File "c:\Temp__programs\Stable Def\venv\lib\site-packages\gradio\blocks.py", line 1315, in process_api result = await self.call_function( File "c:\Temp__programs\Stable Def\venv\lib\site-packages\gradio\blocks.py", line 1043, in call_function prediction = await anyio.to_thread.run_sync( File "c:\Temp__programs\Stable Def\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "c:\Temp__programs\Stable Def\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "c:\Temp__programs\Stable Def\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Temp__programs\Stable Def\extensions\Mask2Background\scripts\inpaint_anything.py", line 43, in wrapper res = func(*args, **kwargs) File "C:\Temp__programs\Stable Def\extensions\Mask2Background\scripts\inpaint_anything.py", line 117, in select_mask ret_image = create_mask(input_image) File "C:\Temp__programs\Stable Def\extensions\Mask2Background\scripts\inpaint_anything.py", line 43, in wrapper res = func(*args, **kwargs) File "C:\Temp__programs\Stable Def\extensions\Mask2Background\scripts\inpaint_anything.py", line 86, in create_mask for h in range(img.width): AttributeError: 'NoneType' object has no attribute 'width'

eastone11 avatar Jul 19 '23 15:07 eastone11

image What is your version of AUTOMATIC 1111?

limithit avatar Jul 20 '23 07:07 limithit

Your dependencies were not installed successfully perhaps

limithit avatar Jul 20 '23 08:07 limithit

version: [## 1.4.1] i have black screens bf201ba50e3d145b532e648121920e3e

eastone11 avatar Jul 20 '23 17:07 eastone11

AUTOMATIC 1111? yes

eastone11 avatar Jul 20 '23 17:07 eastone11

Obviously, you didn't read the readme.md, which warns that images need to be in png format and contain transparent pixels in order to work, and your image has a background, so you get an error!

limithit avatar Jul 21 '23 08:07 limithit

image A mosaic pixel is called a transparent region

limithit avatar Jul 21 '23 08:07 limithit

Obviously, but not obvious. 7c02275f2688c3da4e2e3d27fb436236

eastone11 avatar Jul 21 '23 10:07 eastone11