Open koaqiu opened 1 year ago
do not exist
"#controlnet > div > div.tabs > div:not(.tab-nav)" "#controlnet > div:nth-child(2) > .tabs > .tabitem, #controlnet > div:nth-child(2) > div:not(.tabs)"
like this https://github.com/fkunn1326/openpose-editor/issues/99#issuecomment-1486346829
i change code to
let input = gradioApp().querySelector(selector).querySelector("#controlnet").querySelector("input[type='file']");
const input_image = (input) =>{
try {
if(input.previousElementSibling
&& input.previousElementSibling.previousElementSibling
&& input.previousElementSibling.previousElementSibling.querySelector("button[aria-label='Clear']")) {
input.previousElementSibling.previousElementSibling.querySelector("button[aria-label='Clear']").click()
}
} catch (e) {
console.error(e)
}
input.value = "";
input.files = list;
const event = new Event('change', { 'bubbles': true, "composed": true });
input.dispatchEvent(event);
}
if (input == null){
const callback = (observer) => {
input = gradioApp().querySelector(selector).querySelector("#controlnet").querySelector("input[type='file']");
if (input == null) {
console.error('input[type=file] NOT exists')
return
}else{
input_image(input)
observer.disconnect()
}
}
const observer = new MutationObserver(callback);
observer.observe(gradioApp().querySelector(selector).querySelector("#controlnet"), { childList: true });
}else{
input_image(input)
}
fix
@koaqiu Please send me a PR
@koaqiu Please send me a PR
done
Hey thank you guys for fixing this awesome plugin :) it works now!
Update did not fix it for me on my linux machine, I had to manually remove + reinstall
Thanks!
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Screenshots
Environment
Additional context python: 3.10.6 • torch: 1.13.1+cu117 • xformers: N/A • gradio: 3.23.0 • commit: 955df775 • checkpoint: fc2511737a
use https://github.com/AUTOMATIC1111/stable-diffusion-webui/tree/22bcc7be428c94e9408f589966c2040187245d81
same problem