Giter Club home page Giter Club logo

ddetailer's People

Contributors

dustysys avatar jwfraustro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ddetailer's Issues

tried to do a fresh install of ddetailer still having issues

"C:\Users\user\stable-diffusion-webui\venv\lib\site-packages\mmdet_init_.py", line 16, in
assert (mmcv_version >= digit_version(mmcv_minimum_version)
AssertionError: MMCV==1.7.1 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.

can't use ddetailer

python-3.10.6
git-2.40.0
visual studio 2022
installed

I installed ddetailer but it doesn't show up.

When I run stable diffusion, I get an error like this.

stable duffusion
Error loading script: ddetailer.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 458, in
from mmdet.core import get_classes
File "C:\stable-diffusion-webui\venv\lib\site-packages\mmdet_init
.py", line 3, in
import mmengine

I really want to try using it. Please tell me how to solve it.

Option to save image before ddetailer run

Wasn't able to find this option, but maybe I'm just missing it. I'd like to save the image generated before the script runs as well as the final image. kinda like "save before hi res fix/face restoration"

Error loading script

Hello,
I'm getting this error when SD is launching:

Installing openmim

Installing mmcv-full

Installing mmdet

Error loading script: ddetailer.py

Traceback (most recent call last):

File "D:\Programmi\Stable Diffusion 1111\stable-diffusion-webui\modules[scripts.py](https://scripts.py/)", line 256, in load_scripts

script_module = script_loading.load_module(scriptfile.path)

File "D:\Programmi\Stable Diffusion 1111\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module

module_spec.loader.exec_module(module)

File "", line 883, in exec_module

File "", line 241, in _call_with_frames_removed

File "D:\Programmi\Stable Diffusion 1111\stable-diffusion-webui\extensions\ddetailer\scripts[ddetailer.py](https://ddetailer.py/)", line 61, in

startup()

File "D:\Programmi\Stable Diffusion 1111\stable-diffusion-webui\extensions\ddetailer\scripts[ddetailer.py](https://ddetailer.py/)", line 50, in startup

run(f'"{python}" -m pip install mmdet', desc=f"Installing mmdet", errdesc=f"Couldn't install mmdet")

File "D:\Programmi\Stable Diffusion 1111\stable-diffusion-webui[launch.py](https://launch.py/)", line 97, in run

raise RuntimeError(message)

RuntimeError: Couldn't install mmdet.

Command: "D:\Programmi\Stable Diffusion 1111\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install mmdet

Error code: 1

stdout: Collecting mmdet

Using cached mmdet-2.28.2-py3-none-any.whl (1.5 MB)

Collecting terminaltables

Using cached terminaltables-3.1.10-py2.py3-none-any.whl (15 kB)

Requirement already satisfied: numpy in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (1.23.3)

Requirement already satisfied: scipy in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (1.10.1)

Collecting pycocotools

Using cached pycocotools-2.0.6.tar.gz (24 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing metadata (pyproject.toml): started

Preparing metadata (pyproject.toml): finished with status 'done'

Requirement already satisfied: six in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (1.16.0)

Requirement already satisfied: matplotlib in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (3.7.1)

Requirement already satisfied: python-dateutil>=2.7 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (2.8.2)

Requirement already satisfied: kiwisolver>=1.0.1 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (1.4.4)

Requirement already satisfied: cycler>=0.10 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (0.11.0)

Requirement already satisfied: pillow>=6.2.0 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (9.4.0)

Requirement already satisfied: pyparsing>=2.3.1 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (3.0.9)

Requirement already satisfied: fonttools>=4.22.0 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (4.39.3)

Requirement already satisfied: contourpy>=1.0.1 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (1.0.7)

Requirement already satisfied: packaging>=20.0 in d:\programmi\stable diffusion 1111\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (23.0)

Building wheels for collected packages: pycocotools

Building wheel for pycocotools (pyproject.toml): started

Building wheel for pycocotools (pyproject.toml): finished with status 'error'

Failed to build pycocotools

stderr: error: subprocess-exited-with-error

Building wheel for pycocotools (pyproject.toml) did not run successfully.

exit code: 1

Error when used in Batch Img2Img

I get this error every time I use DDetailer in batch img2img:

Traceback (most recent call last):
File "C:\sd-webui\modules\ui.py", line 185, in f
res = list(func(*args, **kwargs))
File "c:\sd-webui\webui.py", line 54, in f
res = func(*args, **kwargs)
File "C:\sd-webui\modules\img2img.py", line 133, in img2img
process_batch(p, img2img_batch_input_dir, img2img_batch_output_dir, args)
File "C:\sd-webui\modules\img2img.py", line 46, in process_batch
proc = modules.scripts.scripts_img2img.run(p, *args)
File "C:\sd-webui\modules\scripts.py", line 290, in run
processed = script.run(p, *script_args)
File "C:\sd-webui\extensions\ddetailer\scripts\ddetailer.py", line 272, in run
results_a = inference(init_image, dd_model_a, dd_conf_a/100.0, label_a)
File "C:\sd-webui\extensions\ddetailer\scripts\ddetailer.py", line 475, in inference
results = inference_mmdet_segm(image, modelname, conf_thres, label)
File "C:\sd-webui\extensions\ddetailer\scripts\ddetailer.py", line 483, in inference_mmdet_segm
mmdet_results = inference_detector(model, np.array(image))
File "c:\sd-webui\venv\lib\site-packages\mmdet\apis\inference.py", line 133, in inference_detector
data = test_pipeline(data)
File "c:\sd-webui\venv\lib\site-packages\mmdet\datasets\pipelines\compose.py", line 41, in call
data = t(data)
File "c:\sd-webui\venv\lib\site-packages\mmdet\datasets\pipelines\test_time_aug.py", line 107, in call
data = self.transforms(_results)
File "c:\sd-webui\venv\lib\site-packages\mmdet\datasets\pipelines\compose.py", line 41, in call
data = t(data)
File "c:\sd-webui\venv\lib\site-packages\mmdet\datasets\pipelines\transforms.py", line 664, in call
self._pad_img(results)
File "c:\sd-webui\venv\lib\site-packages\mmdet\datasets\pipelines\transforms.py", line 633, in _pad_img
padded_img = mmcv.impad_to_multiple(
File "c:\sd-webui\venv\lib\site-packages\mmcv\image\geometric.py", line 588, in impad_to_multiple
return impad(img, shape=(pad_h, pad_w), pad_val=pad_val)
File "c:\sd-webui\venv\lib\site-packages\mmcv\image\geometric.py", line 537, in impad
assert len(pad_val) == img.shape[-1]
AssertionError

A-b

9CA118EF-15CF-4C9B-BEF6-22CA566162CF
Here is my first attempt at:

prompt- wearing a space suit.

A-b with a being whole person and b being face

The lady’s face was preserved but dude was altered.

Is there any command to perform this operation on all subjects? Seems like it ignores the command after one person maybe?

no work for torch 2.0+cuda11.8=xformer0.017rc482

no work for torch 2.0+cuda11.8=xformer0.017rc482 ,plz update
File "D:\sdXK\modules\scripts.py", line 248, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\sdXK\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\sdXK\extensions\ddetailer\scripts\ddetailer.py", line 458, in
from mmdet.core import get_classes
File "D:\sdXK\python\lib\site-packages\mmdet\core_init
.py", line 3, in
from .bbox import * # noqa: F401, F403
File "D:\sdXK\python\lib\site-packages\mmdet\core\bbox_init_.py", line 8, in
from .samplers import (BaseSampler, CombinedSampler,
File "D:\sdXK\python\lib\site-packages\mmdet\core\bbox\samplers_init_.py", line 12, in
from .score_hlr_sampler import ScoreHLRSampler
File "D:\sdXK\python\lib\site-packages\mmdet\core\bbox\samplers\score_hlr_sampler.py", line 3, in
from mmcv.ops import nms_match
File "D:\sdXK\python\lib\site-packages\mmcv\ops_init_.py", line 3, in
from .active_rotated_filter import active_rotated_filter
File "D:\sdXK\python\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "D:\sdXK\python\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "D:\sdXK\python\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _ext: 找不到指定的程序。

Possible to run script only once for batch process?

From my very limited understand about programming,
it seems that when I am running the script,
it outlines the person, then inpaints with whatever prompts I wrote in img2img.

However when I am running batch process (e.g. set batch count to 12),
it runs every time the image generates.
But since I am using the same parent image for edit,
is it possible to just run the script once to outline, then generate 12 images from it?

Many thanks for your help!

ignore "Batch size" slider

The script is good and all, but if I use it with a Batch size size more than 1, it stop the processing after the first image... This is a tiddy bit annoying.

Is it possible to save the created mask?

I noticed generation slows down when using the script. So is there a way to only run it once, get the mask and just use the previous mask without running the script again? If not it would be a good addition.

Error when running script

I installed, restarted UI. When I tried using the script on the inpainting tab, I got this error. Thanks.

Traceback (most recent call last):
File "C:\Users\Evan1\AUTOMATIC1111\stable-diffusion-webui\modules\ui.py", line 188, in f
res = list(func(*args, **kwargs))
File "C:\Users\Evan1\AUTOMATIC1111\stable-diffusion-webui\webui.py", line 57, in f
res = func(*args, **kwargs)
File "C:\Users\Evan1\AUTOMATIC1111\stable-diffusion-webui\modules\img2img.py", line 137, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "C:\Users\Evan1\AUTOMATIC1111\stable-diffusion-webui\modules\scripts.py", line 317, in run
processed = script.run(p, *script_args)
File "C:\Users\Evan1\AUTOMATIC1111\stable-diffusion-webui\scripts\external_masking.py", line 227, in run
p.image_mask,self.lastPolys = display_mask_ui(p.init_images[0],p.image_mask,max_size,self.lastPolys)
File "C:\Users\Evan1\AUTOMATIC1111\stable-diffusion-webui\scripts\external_masking.py", line 69, in display_mask_ui
cv2.namedWindow('MaskingWindow', cv2.WINDOW_AUTOSIZE)
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1250: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'

Issue with picture metadata

While using ddetailer with wildcards, the image metadata (prompt) doesn't shown the tag randomly chosen by the wildcard but the wildcard keyword.
For exemple, it will show "color" instead of "blue".
I am using the Umi-Ai extension. https://github.com/Klokinator/Umi-AI
I am unsure if the issue exists with automatic1111 implementation.

Errors with the last webui update

Since the last update ddetailer no longer works.
Torch version is now 2.0.0
Here my console errors :
Error loading script: ddetailer.py Traceback (most recent call last): File "S:\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "S:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "S:\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 458, in <module> from mmdet.core import get_classes File "S:\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\__init__.py", line 3, in <module> from .bbox import * # noqa: F401, F403 File "S:\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\bbox\__init__.py", line 8, in <module> from .samplers import (BaseSampler, CombinedSampler, File "S:\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\bbox\samplers\__init__.py", line 12, in <module> from .score_hlr_sampler import ScoreHLRSampler File "S:\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\bbox\samplers\score_hlr_sampler.py", line 3, in <module> from mmcv.ops import nms_match File "S:\stable-diffusion-webui\venv\lib\site-packages\mmcv\ops\__init__.py", line 2, in <module> from .active_rotated_filter import active_rotated_filter File "S:\stable-diffusion-webui\venv\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in <module> ext_module = ext_loader.load_ext( File "S:\stable-diffusion-webui\venv\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "C:\Users\kaned\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed while importing _ext: La procédure spécifiée est introuvable.

How fix it ?
ddetailer needs an update ?

HANDS detailer !!

face and person detailer does wonders so imagine a detailer just for HANDS. that will make things so much better!!

X/Y offset causes mask to wrap around image

If you use the X or Y offset to move the mask around, it is possible for the mask area to exceed the canvas size. This results in the mask wrapping around to the other side of the image.

Example: I have faces near the top of the image and I want the mask to include their hair as well. I increase the dilation factor and change the Y offset to move it up. Normally, this results in masks over the face AND hair, but in some cases where the face is very near the top of the image, the Y offset will cause the mask to wrap around to the bottom of the image.

This ends up causing unwanted padding and results in a massive loss of quality.

Correct behavior:
Screenshot (1264)

Correct Masked area and padding:
Screenshot (1265)

Incorrect behavior:
Screenshot (1266)

Incorrect masked area and unwanted padding:
Screenshot (1267)

I thought of using A+B to avoid the issue, but feet/legs intersecting body parts have a tendency to make it not work.

I've solved all my problems. (maybe) web UI users.

I'm not a resident of an English-speaking country, so I wrote it with Google Translate. Understand me.

step 1. Delete the mmdet folder from the \stable-deffusion-webui\models\ folder.
and Delete the ddetailer folder from the \stable-deffusion-webui\extensions\ folder.
After this you need to install the latest version of ddetailer.
https://github.com/dustysys/ddetailer.git

And end the Colab notes session.

step 2. run Colab note.

step 3. Connect google drive. and add <+code>
제목 없음

step 4. Paste the code as written below.
!pip uninstall -q -y torch torchvision torchtext torchdata torchaudio
!pip install -q -U torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchtext torchdata torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
!pip uninstall -q -y xformers
!pip install -q -U xformers==0.0.16rc425
!pip install -q -U openmim==0.3.7
!mim install -q -U mmcv-full==1.7.1
!pip install -q -U mmdet==2.28.2

and then, Click the [ ] on the left to run it. It may take a little while to complete. You have to wait until the playback indicator disappears.
If this process is complete, go through all the rest of the note execution process.
It will run without any error messages, and you should see the ddetailer menu in the scripts menu.

ps - An error may occur during the execution of codes 3 and 4. In this case, if you add and run the code below, you will be able to use xformer normally.
!pip install -U xformers --no-deps -qq

ps2 - I forgot to mention that I had to fix the script.
Run the scripts.py file in the \stable-diffusion-webui\extensions\ddetailer\scripts folder.
From line 48, modify it to specify the version to be installed as shown below.

run(f'"{python}" -m pip install -U openmim==0.3.7', desc="Installing openmim", errdesc="Couldn't install openmim")
run(f'"{python}" -m mim install mmcv-full==1.7.1', desc=f"Installing mmcv-full", errdesc=f"Couldn't install mmcv-full")
run(f'"{python}" -m pip install mmdet==2.28.2', desc=f"Installing mmdet", errdesc=f"Couldn't install mmdet")

How about being in out of scripts?

I often use it and x/y/z plot in scripts.
I wan to use these two at the same time but can't.
It is because they are in scripts.
How about being in out of scripts like other extensions?

No module named 'mmcv._ext'

This is the error I get, after trying for an hour all the possible combinations I found in resolved issues, still didn't fix it.

image

Error loading script: ddetailer.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui-master\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion-webui-master\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\stable-diffusion-webui-master\extensions\ddetailer-master\scripts\ddetailer.py", line 458, in
from mmdet.core import get_classes
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmdet\core_init
.py", line 3, in
from .bbox import * # noqa: F401, F403
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmdet\core\bbox_init_.py", line 8, in
from .samplers import (BaseSampler, CombinedSampler,
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmdet\core\bbox\samplers_init_.py", line 12, in
from .score_hlr_sampler import ScoreHLRSampler
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmdet\core\bbox\samplers\score_hlr_sampler.py", line 3, in
from mmcv.ops import nms_match
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmcv\ops_init_.py", line 3, in
from .active_rotated_filter import active_rotated_filter
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "C:\Users~Rocky~\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'mmcv._ext'

Can't install to automatik.

Traceback (most recent call last):
File "C:\StableDif\stable-diffusion-webui\modules\scripts.py", line 170, in load_scripts
exec(compiled, module.dict)
File "C:\StableDif\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 61, in
startup()
File "C:\StableDif\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 50, in startup
run(f'"{python}" -m pip install mmdet', desc=f"Installing mmdet", errdesc=f"Couldn't install mmdet")
File "C:\StableDif\stable-diffusion-webui\launch.py", line 34, in run
raise RuntimeError(message)
RuntimeError: Couldn't install mmdet.
Command: "C:\StableDif\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install mmdet
Error code: 1
stdout: Collecting mmdet
Downloading mmdet-2.25.3-py3-none-any.whl (1.4 MB)
---------------------------------------- 1.4/1.4 MB 3.7 MB/s eta 0:00:00
Collecting terminaltables
Using cached terminaltables-3.1.10-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: matplotlib in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (3.6.0)
Requirement already satisfied: six in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (1.16.0)
Collecting pycocotools
Downloading pycocotools-2.0.6.tar.gz (24 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: numpy in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from mmdet) (1.23.3)Requirement already satisfied: fonttools>=4.22.0 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (4.37.3)
Requirement already satisfied: cycler>=0.10 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (0.11.0)
Requirement already satisfied: contourpy>=1.0.1 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (1.0.5)
Requirement already satisfied: pillow>=6.2.0 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (9.2.0)
Requirement already satisfied: pyparsing>=2.2.1 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (3.0.9)
Requirement already satisfied: packaging>=20.0 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (21.3)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (1.4.4)
Requirement already satisfied: python-dateutil>=2.7 in c:\stabledif\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->mmdet) (2.8.2)
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (pyproject.toml): started
Building wheel for pycocotools (pyproject.toml): finished with status 'error'
Failed to build pycocotools

stderr: error: subprocess-exited-with-error

Building wheel for pycocotools (pyproject.toml) did not run successfully.
exit code: 1

[16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-cpython-310\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-310\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-cpython-310\pycocotools
copying pycocotools_init_.py -> build\lib.win-amd64-cpython-310\pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools_mask.c
C:\Users\wtf\AppData\Local\Temp\pip-build-env-udsl37br\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\wtf\AppData\Local\Temp\pip-install-w_yjsqvm\pycocotools_e0dc3a4c296d4ac9aea44b144c9d5da5\pycocotools_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools._mask' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

ModuleNotFoundError: No module named 'mmengine'

After I install ddtailer in Stable Diffusion WebUI, I start the WebUI. Then cmd console say like below.

Error loading script: ddetailer.py
Traceback (most recent call last):
File "F:\AI\WebUI\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "F:\AI\WebUI\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "F:\AI\WebUI\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 458, in
from mmdet.core import get_classes
File "F:\AI\WebUI\stable-diffusion-webui\venv\lib\site-packages\mmdet_init
.py", line 3, in
import mmengine
ModuleNotFoundError: No module named 'mmengine'

How can I fix it ?

Help please :(

An error

I can't post all the messages

"Error loading script: ddetailer.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui\modules\scripts.py", line 171, in load_scripts
exec(compiled, module.dict)
File "C:\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 61, in
startup()
File "C:\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 50, in startup
run(f'"{python}" -m pip install mmdet', desc=f"Installing mmdet", errdesc=f"Couldn't install mmdet")
File "C:\stable-diffusion-webui\launch.py", line 34, in run
raise RuntimeError(message)
RuntimeError: Couldn't install mmdet.
.....

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects"

Error loading script

anyhelp dealing with this error would be great!

Error loading script: ddetailer.py
Traceback (most recent call last):
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\modules\scripts.py", line 248, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 458, in from mmdet.core import get_classes
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmdet\core_init
.py", line 3, in
from .bbox import * # noqa: F401, F403
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\bbox_init_.py", line 8, in
from .samplers import (BaseSampler, CombinedSampler,
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\bbox\samplers_init_.py", line 12, in
from .score_hlr_sampler import ScoreHLRSampler
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmdet\core\bbox\samplers\score_hlr_sampler.py", line 3, in
from mmcv.ops import nms_match
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmcv\ops_init_.py", line 3, in from .active_rotated_filter import active_rotated_filter
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "C:\Users\Rahmel Jackson\stable-diffusion-webui\venv\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "C:\Users\Rahmel Jackson\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _ext: The specified procedure could not be found.

No module named 'mmengine'

I am relatively new using AUTOMATIC1111's stable diffusion. I downloaded using the url from the extension, and I had this error:

Error loading script: ddetailer.py
Traceback (most recent call last):
File "C:\Users<username>\Desktop\ai\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Users<username>\Desktop\ai\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users<username>\Desktop\ai\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 458, in
from mmdet.core import get_classes
File "C:\Users<username>\Desktop\ai\stable-diffusion-webui\venv\lib\site-packages\mmdet_init
.py", line 3, in
import mmengine
ModuleNotFoundError: No module named 'mmengine'

No place to write prompts positive/negative in for the Detection Detailer

I have installed the extension and installed everything the extension needs and I do see "Detection Detailer" in my "Script" section but there is no area to write positive or negative prompts in for it so it pretty much does nothing. I had a bunch of issues with this extension to the point that I uninstalled my whole webui and reinstalled everything back cleanly and at the latest versions and it still does not want to work properly at all. I also have a pic of my extensions just in case there is any conflicts between them, though I highly doubt it.
image_2023-04-19_165223838
image

No module named 'mmdet.core'

After trying to install it several times with great difficulty, I totally removed Python and reinstalled everything.
I now have the error "No module named 'mmdet.core'" even though I just installed the mmdet module.

How to remove this error? Thanks

Can't install to automatik AMD

on ubuntu 20.04 worked fine updated put 22.04 now gives out this
Reloading custom scripts Error loading script: ddetailer.py Traceback (most recent call last): File "/home/aleks/stable-diffusion-webui/modules/scripts.py", line 184, in load_scripts module = script_loading.load_module(scriptfile.path) File "/home/aleks/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module exec(compiled, module.__dict__) File "/home/aleks/stable-diffusion-webui/extensions/ddetailer/scripts/ddetailer.py", line 458, in <module> from mmdet.core import get_classes File "/home/aleks/.local/lib/python3.10/site-packages/mmdet/core/__init__.py", line 3, in <module> from .bbox import * # noqa: F401, F403 File "/home/aleks/.local/lib/python3.10/site-packages/mmdet/core/bbox/__init__.py", line 8, in <module> from .samplers import (BaseSampler, CombinedSampler, File "/home/aleks/.local/lib/python3.10/site-packages/mmdet/core/bbox/samplers/__init__.py", line 12, in <module> from .score_hlr_sampler import ScoreHLRSampler File "/home/aleks/.local/lib/python3.10/site-packages/mmdet/core/bbox/samplers/score_hlr_sampler.py", line 3, in <module> from mmcv.ops import nms_match File "/home/aleks/.local/lib/python3.10/site-packages/mmcv/ops/__init__.py", line 2, in <module> from .active_rotated_filter import active_rotated_filter File "/home/aleks/.local/lib/python3.10/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in <module> ext_module = ext_loader.load_ext( File "/home/aleks/.local/lib/python3.10/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory

I have an AMD card so I'm not sure if this is necessary.
if you do a search then there is such a file
sudo find / -name 'libcudart.so.11.0'

/home/aleks/.local/lib/python3.10/site-packages/nvidia/cuda_runtime/lib/libcudart.so.11.0

install 'mmcv-full' -> mmcv

ddetailer is trying to mmcv-full when there is no mmdet module.
But it doesn't need to install mmcv-full. If you have same issue which is waiting for installation, then open the ddtailer.py and comment out this line below.
run(f'"{python}" -m mim install mmcv-full', desc=f"Installing mmcv-full", errdesc=f"Couldn't install mmcv-full")

-> # run(f'"{python}" -m mim install mmcv-full', desc=f"Installing mmcv-full", errdesc=f"Couldn't install mmcv-full")

And you installed the mmcv following your platform. Just refer to this url.
https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-mmcv

Move out of script Plz

Move out of script Plz, like poseX LLuL cutoff
easy to use with other script, because stable diffusion only can use 1 scrpt

seems not work with wildcards

Good tools !
seems not work with wildcards:
when I switch Detection Detailer script on, wildcards is not work,
when I switch Detection Detailer script off, wildcards is work,
Pls check

AttributeError: 'ConfigDict' object has no attribute 'test_dataloader'

I tried using animeface yolov3 and it gave me this error while trying to process the image. How to fix?

Traceback (most recent call last):
File "E:\AI\stable-diffusion-webui\venv\lib\site-packages\mmengine\config\config.py", line 52, in getattr
value = super().getattr(name)
File "E:\AI\stable-diffusion-webui\venv\lib\site-packages\addict\addict.py", line 67, in getattr
return self.getitem(item)
File "E:\AI\stable-diffusion-webui\venv\lib\site-packages\mmengine\config\config.py", line 48, in missing
raise KeyError(name)
KeyError: 'test_dataloader'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\AI\stable-diffusion-webui\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "E:\AI\stable-diffusion-webui\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "E:\AI\stable-diffusion-webui\modules\txt2img.py", line 53, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 408, in run
processed = script.run(p, *script_args)
File "E:\AI\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 303, in run
results_a = inference(init_image, dd_model_a, dd_conf_a/100.0, label_a)
File "E:\AI\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 516, in inference
results = inference_mmdet_bbox(image, modelname, conf_thres, label)
File "E:\AI\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 584, in inference_mmdet_bbox
output = inference_detector(model, np.array(image)).pred_instances
File "E:\AI\stable-diffusion-webui\venv\lib\site-packages\mmdet\apis\inference.py", line 146, in inference_detector
test_pipeline = get_test_pipeline_cfg(cfg)
File "E:\AI\stable-diffusion-webui\venv\lib\site-packages\mmdet\utils\misc.py", line 105, in get_test_pipeline_cfg
return _get_test_pipeline_cfg(cfg.test_dataloader.dataset)
File "E:\AI\stable-diffusion-webui\venv\lib\site-packages\mmengine\config\config.py", line 54, in getattr
raise AttributeError(f"'{self.class.name}' object has no "
AttributeError: 'ConfigDict' object has no attribute 'test_dataloader'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.