portu-sim / sd-webui-bmab

Auto masking and inpainting for person, face, hand. Resizing image using detection model.
GNU Affero General Public License v3.0
292 stars 29 forks source link

Hi, after i update to SD1.8, i have this issue that sd-webui-bmab cannot be load, may i know any solution to fix this? Thank you #29

Closed DK22024 closed 3 months ago

DK22024 commented 4 months ago

sd-webui-bmab Issue

ArmyOfPun1776 commented 4 months ago

sd-webui-bmab Issue

Hi There!

So I was having the same issue. I'm on 1.8 as well though I don't think the error has anything to do with the 1.8 update. If I'm wrong I'm wrong. I didn't install this Extension until after I was already on v1.8.

It seems that, maybe, at some point the .py file the extension is looking for basicsr.py was removed from the archive. This can be traced by opening the bmab.py file in the extensions directory and following the imports

-or-

Simply looking at the last line of the error thrown by Automatic1111: File "C:\SD1.8\weui\extensions\sd-webui-bmab\util.py", line 8, in <module> ModuleNotFoundError: No module named 'basicsr'

Line 8 in util.py is from basicsr.utils.download_util import load_file_from_url

This is the line creating the conflict. The script seems to be looking for a file called basicsr and some lines of code within it called download_util under a util parameter. This code previously pointed to a url that was downloading some files for the extension, I guess.

In an earlier version the creator may have had this call present to save on space or something. I'm not really sure. But since the file doesn't exist in the .git I assume it's an obsolete line of code and is unnecessary for the extension to function as intended.

So... What did I do to make it work? I removed line 8 in the util.py file from basicsr.utils.download_util import load_file_from_url.

Behold! The extension works as expected so far. Though I'm only really using the extension to do some minor Image enhancements. I haven't gotten into the more "advanced" settings and utilities yet.

Hope this helps. And I'm sure if I'm wrong about any of this; The creator will lay into me. lol

portu-sim commented 4 months ago

Thank you. update soon.

nitinmukesh commented 4 months ago

To fix this issue.

  1. Open command prompt and navigate to path where webui is installed e.g.
image
  1. venv\scripts\activate.bat
  2. pip install basicsr

Close command prompt and launch WebUI.

ArmyOfPun1776 commented 4 months ago

To fix this issue.

  1. Open command prompt and navigate to path where webui is installed e.g.
image
  1. venv\scripts\activate.bat
  2. pip install basicsr

Close command prompt and launch WebUI.

Thanks... but how do you navigate to a .bat file exactly? I've never seen or done that before. I mean I'm all good getting to the scripts folder... but... wha?

rungvang commented 4 months ago

To fix this issue.

  1. Open command prompt and navigate to path where webui is installed e.g.
image
  1. venv\scripts\activate.bat
  2. pip install basicsr Close command prompt and launch WebUI.

Thanks... but how do you navigate to a .bat file exactly? I've never seen or done that before. I mean I'm all good getting to the scripts folder... but... wha?

Navigate to your SD folder, type "cmd" on the upper adress bar -> it will open cmd with the path to your SD folder, you will see something like this: C:\stable_diffusion>, then you type next command directly in the cmd:

venv\scripts\activate.bat

Hit Enter then type:

pip install basicsr

Hit Enter.

345356

ArmyOfPun1776 commented 4 months ago

To fix this issue.

  1. Open command prompt and navigate to path where webui is installed e.g.
image
  1. venv\scripts\activate.bat
  2. pip install basicsr Close command prompt and launch WebUI.

Thanks... but how do you navigate to a .bat file exactly? I've never seen or done that before. I mean I'm all good getting to the scripts folder... but... wha?

Navigate to your SD folder, type "cmd" on the upper adress bar -> it will open cmd with the path to your SD folder, you will see something like this: C:\stable_diffusion>, then you type next command directly in the cmd:

venv\scripts\activate.bat

Hit Enter then type:

pip install basicsr

Hit Enter.

345356

OK. I'm with you. Ran the commands. got a dialog. installed a bunch of files. started the UI. Same error for bmab.

Closed WebUI. returned to cmd. navigated to target again. ran command. All requirements satisfied. So it is installed. hrm.

Thanks for the info though. I'll be messing around with it more here in a little bit.

rungvang commented 4 months ago

To fix this issue.

  1. Open command prompt and navigate to path where webui is installed e.g.
image
  1. venv\scripts\activate.bat
  2. pip install basicsr Close command prompt and launch WebUI.

Thanks... but how do you navigate to a .bat file exactly? I've never seen or done that before. I mean I'm all good getting to the scripts folder... but... wha?

Navigate to your SD folder, type "cmd" on the upper adress bar -> it will open cmd with the path to your SD folder, you will see something like this: C:\stable_diffusion>, then you type next command directly in the cmd: venv\scripts\activate.bat Hit Enter then type: pip install basicsr Hit Enter. 345356

OK. I'm with you. Ran the commands. got a dialog. installed a bunch of files. started the UI. Same error for bmab.

Closed WebUI. returned to cmd. navigated to target again. ran command. All requirements satisfied. So it is installed. hrm.

Thanks for the info though. I'll be messing around with it more here in a little bit.

Strange, I have the same error not only for bmab but also for openpose. After installed the basicsr the problem is fixed. My python ver is 3.10.10. Pip ver 24.0.

ArmyOfPun1776 commented 4 months ago

To fix this issue.

  1. Open command prompt and navigate to path where webui is installed e.g.
image
  1. venv\scripts\activate.bat
  2. pip install basicsr Close command prompt and launch WebUI.

Thanks... but how do you navigate to a .bat file exactly? I've never seen or done that before. I mean I'm all good getting to the scripts folder... but... wha?

Navigate to your SD folder, type "cmd" on the upper adress bar -> it will open cmd with the path to your SD folder, you will see something like this: C:\stable_diffusion>, then you type next command directly in the cmd: venv\scripts\activate.bat Hit Enter then type: pip install basicsr Hit Enter. 345356

OK. I'm with you. Ran the commands. got a dialog. installed a bunch of files. started the UI. Same error for bmab. Closed WebUI. returned to cmd. navigated to target again. ran command. All requirements satisfied. So it is installed. hrm. Thanks for the info though. I'll be messing around with it more here in a little bit.

Strange, I have the same error not only for bmab but also for openpose. After installed the basicsr the problem is fixed. My python ver is 3.10.10. Pip ver 24.0.

Yep, same ver of Python and Pip for me as well. Not sure why it would behave like that... Might have to do a clean install to test... Or a branch... Yeah It hink I'll do a Branch... My poor SSD. lol

portu-sim commented 3 months ago

Code Fixed