Merge branch 'dev'

This commit is contained in:
Dowon
2024-03-29 22:13:54 +09:00
7 changed files with 42 additions and 22 deletions

View File

@@ -18,6 +18,16 @@ body:
Alle Sprachen werden akzeptiert
Toutes les langues sont acceptées
Принимаются все языки
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: |
Description of how we can reproduce this issue.
validations:
required: true
- type: textarea
attributes:

View File

@@ -1,6 +1,8 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature Request]: "
labels:
- enhancement
body:
- type: textarea

View File

@@ -10,7 +10,9 @@ jobs:
runs-on: macos-14
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v4

View File

@@ -1,5 +1,10 @@
# Changelog
## 2024-03-29
- v24.3.5
- 알 수 없는 이유로 인페인팅을 확인하는 과정에서 Txt2Img 인스턴스가 들어오는 문제에 대한 임시 해결
## 2024-03-28
- v24.3.4

View File

@@ -1,6 +1,6 @@
# ADetailer
ADetailer is a extension for stable diffusion webui, similar to Detection Detailer, except it uses ultralytics instead of the mmdet.
ADetailer is an extension for the stable diffusion webui that does automatic masking and inpainting. It is similar to the Detection Detailer.
## Install
@@ -18,8 +18,6 @@ You can now install it directly from the Extensions tab.
![image](https://i.imgur.com/g6GdRBT.png)
You **DON'T** need to download any base model from huggingface.
## Options
| Model, Prompts | | |
@@ -59,17 +57,17 @@ If you select `Passthrough`, the controlnet settings you set outside of ADetaile
## Advanced Options
API request example: [wiki/API](https://github.com/Bing-su/adetailer/wiki/API)
API request example: [wiki/REST-API](https://github.com/Bing-su/adetailer/wiki/REST-API)
`ui-config.json` entries: [wiki/ui-config.json](https://github.com/Bing-su/adetailer/wiki/ui-config.json)
`[SEP], [SKIP]` tokens: [wiki/Advanced](https://github.com/Bing-su/adetailer/wiki/Advanced)
`[SEP], [SKIP], [PROMPT]` tokens: [wiki/Advanced](https://github.com/Bing-su/adetailer/wiki/Advanced)
## Media
- 🎥 [どこよりも詳しいAfter Detailer (adetailer)の使い方① 【Stable Diffusion】](https://youtu.be/sF3POwPUWCE)
- 🎥 [どこよりも詳しいAfter Detailer (adetailer)の使い方② 【Stable Diffusion】](https://youtu.be/urNISRdbIEg)
- 📜 [ADetailer Installation and 5 Usage Methods](https://kindanai.com/en/manual-adetailer/)
## Model
| Model | Target | mAP 50 | mAP 50-95 |
@@ -91,7 +89,7 @@ YOLO World model: https://docs.ultralytics.com/models/yolo-world/
### Additional Model
Put your [ultralytics](https://github.com/ultralytics/ultralytics) yolo model in `webui/models/adetailer`. The model name should end with `.pt`.
Put your [ultralytics](https://github.com/ultralytics/ultralytics) yolo model in `models/adetailer`. The model name should end with `.pt`.
It must be a bbox detection or segment model and use all label.
@@ -105,7 +103,7 @@ ADetailer works in three simple steps.
## Development
ADetailer is developed and tested using the stable-diffusion 1.5 model, for the [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) repository only.
ADetailer is developed and tested using the stable-diffusion 1.5 model, for the latest version of [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) repository only.
## License

View File

@@ -1 +1 @@
__version__ = "24.3.4"
__version__ = "24.3.5"

View File

@@ -267,15 +267,12 @@ class AfterDetailerScript(scripts.Script):
try:
inp = ADetailerArgs(**arg_dict)
except ValueError as e:
msgs = [
f"[-] ADetailer: ValidationError when validating {ordinal(n)} arguments: {e}\n"
]
for attr in ALL_ARGS.attrs:
arg = arg_dict.get(attr)
dtype = type(arg)
arg = "DEFAULT" if arg is None else repr(arg)
msgs.append(f" {attr}: {arg} ({dtype})")
raise ValueError("\n".join(msgs)) from e
msg = f"[-] ADetailer: ValidationError when validating {ordinal(n)} arguments"
if hasattr(e, "add_note"):
e.add_note(msg)
else:
print(msg, file=sys.stderr)
raise
all_inputs.append(inp)
@@ -667,12 +664,16 @@ class AfterDetailerScript(scripts.Script):
@staticmethod
def get_image_mask(p) -> Image.Image:
mask = p.image_mask
if p.inpainting_mask_invert:
if getattr(p, "inpainting_mask_invert", False):
mask = ImageChops.invert(mask)
mask = create_binary_mask(mask)
if getattr(p, "_ad_skip_img2img", False):
width, height = p.init_images[0].size
if hasattr(p, "init_images") and p.init_images:
width, height = p.init_images[0].size
else:
msg = "[-] ADetailer: no init_images."
raise RuntimeError(msg)
else:
width, height = p.width, p.height
return images.resize_image(p.resize_mode, mask, width, height)
@@ -1046,6 +1047,8 @@ def add_api_endpoints(_: gr.Blocks, app: FastAPI):
@app.get("/adetailer/v1/schema")
async def schema():
if hasattr(ADetailerArgs, "model_json_schema"):
return ADetailerArgs.model_json_schema()
return ADetailerArgs.schema()
@app.get("/adetailer/v1/ad_model")