Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Detect from image not work #113

Open
huoge1 opened this issue Apr 25, 2023 · 7 comments
Open

Detect from image not work #113

huoge1 opened this issue Apr 25, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@huoge1
Copy link

huoge1 commented Apr 25, 2023

Describe the bug
Detect from image not work
To Reproduce
click Detect from image,select a picture,and then error

1682402677822

@huoge1 huoge1 added the bug Something isn't working label Apr 25, 2023
@fkunn1326
Copy link
Owner

remove stable-diffusion-webui\models\body_pose_model.pth and relaunch will work for you

@SiuLeeBoss
Copy link

I deleted body_pose_model.pth and restarted, but still got this error

@jamesAllenJahner3rd
Copy link

same here, I reinstall openpose and deleted the file body_pose_model. I restarted and it downloaded the model. Then error.
100%|███████████████████████████████████████████████████████████████████████████████| 200M/200M [00:16<00:00, 12.7MB/s]
Traceback (most recent call last):
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 39
4, in run_predict
output = await app.get_blocks().process_api(
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 10
75, in process_api
result = await self.call_function(
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 88
4, in call_function
prediction = await anyio.to_thread.run_sync(
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line
31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.p
y", line 937, in run_sync_in_worker_thread
return await future
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.p
y", line 867, in run
result = context.run(func, *args)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\openpose-editor\scripts\main.py", line
106, in estimate
candidate, subset = body_estimation(pil2cv(img))
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\openpose-editor\scripts\openpose\body.
py", line 49, in call
Mconv7_stage6_L1, Mconv7_stage6_L2 = self.model(data)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py
", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\openpose-editor\scripts\openpose\model
.py", line 118, in forward
out1 = self.model0(x)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py
", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\container
.py", line 204, in forward
input = module(input)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py
", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions-builtin\Lora\lora.py", line 319, in lo
ra_Conv2d_forward
return torch.nn.Conv2d_forward_before_lora(self, input)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py",
line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "E:\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py",
line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[1, 4, 184, 248] to have 3 channels, but got 4
channels instead

@GammelSami
Copy link

I think the 4th channel is the alphachannel.

Workaround: I converted my image to JPEG (which does not support alphachannel), then it worked.

@fkunn1326
Copy link
Owner

I pushed small fix for this issue in https://github.com/fkunn1326/openpose-editor/tree/fkunn1326-patch-3, so please git switch fkunn1326-patch-3 in this extension's directory.

@SasukeCOZA
Copy link

nothing worked for me, I get no error, but my output is nothing or blank

@mwitz8
Copy link

mwitz8 commented Oct 28, 2023

Has anyone got this working again?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants