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

OpenPose Editor is not working properly. #99

Open
iJustGhost opened this issue Mar 27, 2023 · 13 comments
Open

OpenPose Editor is not working properly. #99

iJustGhost opened this issue Mar 27, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@iJustGhost
Copy link

Describe the bug
OpenPose Editor tab is not properly working.

To Reproduce
Steps to reproduce the behavior:

  1. Click send to txt2img.
  2. Check controlnet in txt2img tab.
  3. Pose is not applied.

Expected behavior
Pose should be applied.

Additional context
Probably happened after automatic1111's web ui repo update.

@iJustGhost iJustGhost added the bug Something isn't working label Mar 27, 2023
@jemmywong79
Copy link

OpenPose Editor only open the tab but not sending the image for both button (txt2img and img2img).

@vienduong88
Copy link

I have the same problem.

@jtydhr88
Copy link

as an extension author, I know the cause of this issue is because webui updated its gradio version, which introducing bugs for many extensions who need to send to img to controlNet, but it needs this extension author to fix...

@FireworkTM
Copy link

The HTML layout of webui is changed.

There is a temporarily sulotion, edit this file: webui\extensions\openpose-editor\javascript\main.js
(Remember to backup the file before editing)

Find following code, ~line 482

const accordion = gradioApp().querySelector(selector).querySelector("#controlnet .transition");
if (accordion.classList.contains("rotate-90")) {
accordion.click()
}

    const tabs = gradioApp().querySelector(selector).querySelectorAll("#controlnet > div:nth-child(2) > .tabs > .tabitem, #controlnet > div:nth-child(2) > div:not(.tabs)")
    const tab = tabs[index]
    if (tab.classList.contains("tabitem")) {
        tab.parentElement.firstElementChild.querySelector(`:nth-child(${Number(index) + 1})`).click()
    }
    const input = tab.querySelector("input[type='file']")
    try {
        input.previousElementSibling.previousElementSibling.querySelector("button[aria-label='Clear']").click()
    } catch (e) {
        console.error(e)
    }

replace with:

	// 20230328 JY 
    const accordion = gradioApp().querySelector(selector).querySelector("#controlnet").querySelectorAll("span.icon.svelte-s1r2yt")[0];
			
	// Show controlNet box
	let rotate = accordion.style.transform.match(/rotate\((\d+)(.+)\)/);
	if (rotate) {
		let [num, unit] = rotate.slice(1);  
		if (num == "90") {
			accordion.click()
		}
	}	
	const input = gradioApp().querySelector(selector).querySelector("#controlnet").querySelector("input[type='file']");

reload webui.

@fkunn1326
Copy link
Owner

@FireworkTM Could you please send me a pull request?

@iJustGhost
Copy link
Author

The HTML layout of webui is changed.

There is a temporarily sulotion, edit this file: webui\extensions\openpose-editor\javascript\main.js (Remember to backup the file before editing)

Find following code, ~line 482

const accordion = gradioApp().querySelector(selector).querySelector("#controlnet .transition"); if (accordion.classList.contains("rotate-90")) { accordion.click() }

    const tabs = gradioApp().querySelector(selector).querySelectorAll("#controlnet > div:nth-child(2) > .tabs > .tabitem, #controlnet > div:nth-child(2) > div:not(.tabs)")
    const tab = tabs[index]
    if (tab.classList.contains("tabitem")) {
        tab.parentElement.firstElementChild.querySelector(`:nth-child(${Number(index) + 1})`).click()
    }
    const input = tab.querySelector("input[type='file']")
    try {
        input.previousElementSibling.previousElementSibling.querySelector("button[aria-label='Clear']").click()
    } catch (e) {
        console.error(e)
    }

replace with:

	// 20230328 JY 
    const accordion = gradioApp().querySelector(selector).querySelector("#controlnet").querySelectorAll("span.icon.svelte-s1r2yt")[0];
			
	// Show controlNet box
	let rotate = accordion.style.transform.match(/rotate\((\d+)(.+)\)/);
	if (rotate) {
		let [num, unit] = rotate.slice(1);  
		if (num == "90") {
			accordion.click()
		}
	}	
	const input = gradioApp().querySelector(selector).querySelector("#controlnet").querySelector("input[type='file']");

reload webui.

Tried this one, but dragging while everything is selected is not working.
Still it works.

@Liz2rdWizard
Copy link

The problem is still not fixed, basically the plugin is currently unusable and I'm using blender for posing for now. I tried the temporary fix by FireworkTM, it did not work for me.

There is no such button as "send to controlnet" as I see in every youtube video, but also the "send to text2img" button is not sending the pose to where it should, but only brings me to the "text2img" tab and does nothing else (as reported by other users already)

@fkunn1326
Copy link
Owner

Fixed in 8f17b06.
Please close this issue after confirming that it works properly

@iJustGhost
Copy link
Author

Still didn't fixed, maybe theres another problem.

@fkunn1326
Copy link
Owner

If updating the webui and this extension doesn't fix it, open your browser's console and show me

@Zeon016
Copy link

Zeon016 commented Apr 7, 2023

image

  1. I download openpose editor form github(also the openopse model in controlnet),replace the old one, not work.
  2. I download from the webui extention, sitll not work.
  3. I try the answer somebody works, still not slove.

The problem come out when i set openpose model on controlnet try to use txt2img.
And webui still working to output a img but not related to the openpose.

@Zeon016
Copy link

Zeon016 commented Apr 7, 2023

image

  1. I download openpose editor form github(also the openopse model in controlnet),replace the old one, not work.
  2. I download from the webui extention, sitll not work.
  3. I try the answer somebody works, still not slove.

The problem come out when i set openpose model on controlnet try to use txt2img. And webui still working to output a img but not related to the openpose.

I tried to find a way to do it from the comments section of other tutorial bloggers and found one that worked.

  1. find the file below "G:\stable-diffusion-webui\models\openpose":
  2. Delete "hand-pose-model.pth"&"body-pose-model.pth" .
  3. Run de webui-user.bat again, and use openpose model, the file will be download again.
  4. Then you can to use openpose !!

@jVXgHcey
Copy link

image

  1. I download openpose editor form github(also the openopse model in controlnet),replace the old one, not work.
  2. I download from the webui extention, sitll not work.
  3. I try the answer somebody works, still not slove.

The problem come out when i set openpose model on controlnet try to use txt2img. And webui still working to output a img but not related to the openpose.

I tried to find a way to do it from the comments section of other tutorial bloggers and found one that worked.

  1. find the file below "G:\stable-diffusion-webui\models\openpose":
  2. Delete "hand-pose-model.pth"&"body-pose-model.pth" .
  3. Run de webui-user.bat again, and use openpose model, the file will be download again.
  4. Then you can to use openpose !!

thks,Solved

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

9 participants