[Bug]: sd-webui cannot detect the sam mode
zxwmol opened this issue · 7 comments
Is there an existing issue for this?
- I have searched the existing issues and checked the recent builds/commits of both this extension and the webui
Have you updated WebUI and this extension to the newest version?
- I have updated WebUI and this extension to the most up-to-date version
Do you understand that you should go to https://github.com/IDEA-Research/Grounded-Segment-Anything/issues if you cannot install GroundingDINO?
- My problem is not about installing GroundingDINO
Do you know that you should use the newest ControlNet extension and enable external control if you want SAM extension to control ControlNet?
- I have updated ControlNet extension and enabled "Allow other script to control this extension"
What happened?
I have installed the Segment Anything plugin and downloaded the sam_vit_l_0b3195.pth model, which I placed in the /models/sam directory. However, the sd-webui cannot detect the sam model and the page displays a null prompt.
Steps to reproduce the problem
What should have happened?
Commit where the problem happens
webui: 22bcc7b AUTOMATIC1111/stable-diffusion-webui@22bcc7b
extension: 040312a 040312a
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
--theme dark --port 8080 --xformers --api --autolaunch --server-name 0.0.0.0 --enable-insecure-extension-access
Console logs
Start semantic segmentation with processor seg_ufade20k
Traceback (most recent call last):
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\py310\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\py310\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\py310\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\py310\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\py310\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\py310\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\extensions\sd-webui-segment-anything\scripts\sam.py", line 317, in cnet_seg
sam = load_sam_model(sam_model_name)
File "C:\BaiduNetdiskDownload\sd-webui-aki-v4\extensions\sd-webui-segment-anything\scripts\sam.py", line 73, in load_sam_model
model_type = '_'.join(sam_checkpoint.split('_')[1:-1])
AttributeError: 'NoneType' object has no attribute 'split'
Additional information
No response
你可以把模型放到插件目录下的models/sam下再试试。你需要删除webui/models/sam目录
@ChinSiroyugi 这个issue的作者用的秋叶整合包,感觉应该是**人。
按道理来说这两个目录都可以用,至少我用的是我readme里写的这个path。但是如果有人因为某些莫名其妙的原因用不了了,就可以试试另一个。
@ChinSiroyugi 这个issue的作者用的秋叶整合包,感觉应该是**人。
按道理来说这两个目录都可以用,至少我用的是我readme里写的这个path。但是如果有人因为某些莫名其妙的原因用不了了,就可以试试另一个。
!!!哈哈哈哈哈哈,我的,我以为这是个老外。
我也是不能用默认的${sd-webui}/models/sam
这个path.
想着来issue里看看有没有人跟我是同样的问题,我提一嘴。
same problem
closed via https://github.com/continue-revolution/sd-webui-segment-anything#installation
pick another path if you meet the same problem. follow instruction in the README