huchenlei / sd-webui-openpose-editor

Openpose editor for ControlNet. Full hand/face support.
MIT License
653 stars 65 forks source link

[Bug]: "Edit" is not clickable #62

Open tetsuoo-online opened 9 months ago

tetsuoo-online commented 9 months ago

Is there an existing issue for this?

What happened?

Cannot click on Edit, only JSON or Close The only access is via http://localhost:7860/openpose_editor_index

Steps to reproduce the problem

  1. Import any image (or drag-&-drop)
  2. Select any OpenPose preprocessor
  3. Click on (the explosion icon) "Run preprocessor"

What should have happened?

We should be able to click on the Edit button, but it's only a text

Commit where the problem happens

webui: v1.7.0 (but this problem is not new) controlnet: v1.1.427 openpose-editor: v0.2.4 image

What browsers do you use to access the UI ?

Edge or Firefox

Command Line Arguments

No

Console logs

venv "X:\Stable Diffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 24.1.0, num models: 14
ControlNet preprocessor location: X:\Stable Diffusion\_AI_models\extensions\sd-webui-controlnet\annotator\downloads
2024-01-08 08:22:09,905 - ControlNet - INFO - ControlNet v1.1.427
2024-01-08 08:22:10,017 - ControlNet - INFO - ControlNet v1.1.427
Loading weights [451850aff4] from X:\Stable Diffusion\stable-diffusion-webui\models\Stable-diffusion\Bonkers_v10.safetensors
Creating model from config: X:\Stable Diffusion\stable-diffusion-webui\configs\v1-inference.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

Browser logs

I'm using Edge browser with many tabs. I don't know where is the log for the specific tab used by the webUI Firefow makes no difference.

Additional information

You can see a lot of empty space, I don't know if it's normal or not image Almost all extensions are removed just in case. Removing all makes no difference. image

huchenlei commented 9 months ago

This happened before but we did not figure out why it happened: https://github.com/huchenlei/sd-webui-openpose-editor/issues/33. The previous user re-installed everything and got it working.

Kertnik commented 3 months ago

I managed not only to find but also, to fix this issue. It's similar to this the ECMA script file (index. mjs) was recognized in my system as text/plain, so Firefox (and Chrome too btw) blocked it. To fix the problem you need to apply the solution from the link, not to .js , but to .mjs (perhaps for .js won't hurt either, since it was already correct on my system). I've set the content type to application/ecma and after this and also reboot it finally worked.

Djsisen commented 3 months ago

Hi, I'm sorry for my English, I'm using a translator. I am using a translator. I have already tried to install everything from the beginning. I am using A1111, with controlnet and openpose editor and the edit button of openpose is still not working. You mention a solution in a link but I don't know which link it is, I have to say that I am terrible at programming.I use windows 10. Thanks!

Djsisen commented 3 months ago

I forgot. I have tried with firefox and chrome, M. edge, I. explorer.....

Kertnik commented 3 months ago

Hi, I'm sorry for my English, I'm using a translator. I am using a translator. I have already tried to install everything from the beginning. I am using A1111, with controlnet and openpose editor and the edit button of openpose is still not working. You mention a solution in a link but I don't know which link it is, I have to say that I am terrible at programming.I use windows 10. Thanks!

There was only one link in my message... https://stackoverflow.com/questions/54835510/getting-mime-type-text-plain-error-in-golang-while-serving-css/65150421#65150421

Djsisen commented 3 months ago

Yup, you are right. I have followed so many tutorials and solutions that I didn't know if this fix would work, but it did! thanks for replying and solving my problem!

Kertnik commented 3 months ago

@huchenlei Is it possible to implement something similar to dvaldivia solution for go in your app? I believe this is the library for such purpose in python.

// Execute before the service runs.
func init () {
    _ = mime.AddExtensionType(".js", "text/javascript")
}

Originally posted by @SinguJ in https://github.com/golang/go/issues/32350#issuecomment-1128475902

Ceroxe-sz commented 3 months ago

I also encountered this problem, but I don't understand how you solved it. Do you need to change any registry values

Ceroxe-sz commented 3 months ago

我解决了这个问题!替换为最新的1.10.0-RC没有这个毛病!!! dc5cd37742d905c1c11c57ef169af53

Kertnik commented 3 months ago

I also encountered this problem, but I don't understand how you solved it. Do you need to change any registry values

You need to do what is stated in the stackoverflow answer from the link above. Specifically, add/change register value "Content Type" to "text/javascript" in HKEY_CLASSES_ROOT/.mjs I previously suggested changing it to "application/ecma", but lately I discovered that this is obsolete behaviour and text/javascript is standard now.