Commit Graph

247 Commits

Author SHA1 Message Date
Dowon
fbbe127c9e fix: add PL rule 2024-08-24 13:58:08 +09:00
Dowon
79a74819cb refactor(script): reduce complexity 2024-08-24 13:51:11 +09:00
Dowon
18d8db995f fix(scripts): fix ad_save_images_dir 2024-08-24 13:35:37 +09:00
Dowon
d705c6e30a feat(scripts): update pr options 2024-08-24 13:34:20 +09:00
bluelovers
cc0a11393c feat: add ad_save_images_dir (#689)
* feat: add `ad-save-images`

https://github.com/Bing-su/adetailer/issues/688

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* feat: only enable `ad_save_images_dir` when not empty

https://github.com/Bing-su/adetailer/pull/689#issuecomment-2300057990

* fix: F401 `pathlib.PurePath` imported but unused

https://results.pre-commit.ci/run/github/632823919/1724229072.nxpHBQU4QvaIJ8IOFayT1Q

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-24 13:16:12 +09:00
LoganBooker
38db25b483 Add dynamic denoising and inpaint bbox sizing (#678)
* Added dynamic denoising and inpaint bbox sizing

* Dynamic denoising: Once bboxes are available from the predictor, it is possible to calculate the size of the crop region relative to the original image size. Using this value, we can modulate the "Inpaint denoising strength" based on the region size, with smaller regions getting higher denoising, and smaller areas less.
* Several algorithms were tested, ultimately, a configurable power value worked best. Values between 2-4 are recommended (1 is equivalent to linear).

* Try match inpaint/bbox size: Again, using bbox sizes, we can determine more optimal dimensions and aspect ratio for the inpaint width and height.
* Only active for SDXL, as the model natively handles various dimensions and aspect ratios.

* Don't use inpaint/bbox matching if user has specified their own width and height

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove math.isclose.

* Remove math import

* Remove unneeded formatting

* Better descriptions for new features in settings.

* Tidy up bbox matching, filter out more resolutions earlier

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add strict and free inpaint bbox size matching

* Strict: SDXL only, same as original implementation
* Free (prefer smaller or larger): Theoretically works with any model. Adjusts the inpaint region to match the aspect ratio of the bbox exactly, favouring either the smaller dimension or larger dimension of the original inpaint region. We also round up (if needed) to the closest 8 pixels to make the dimensions nicer to diffusion/upscalers. "Prefer smaller" is the better option, as it will usually very closely match the original inpaint sizes.
* Also added a threshold to the difference between the original inpaint size and adjusted size, and ignore the adjusted size if it's very similar.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use or for checking thresholds on new inpaint dimensions

* Rework free mode to a single setting

Should now always pick optimal dimensions

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-18 14:48:48 +09:00
Dowon
23e3c5d778 feat(script): same sampler option 2024-08-03 13:07:06 +09:00
Dowon
1985fa13e1 fix(scripts): before process 2024-07-20 17:27:38 +09:00
Dowon
62591c43bd fix: fix typo 2024-07-20 17:23:37 +09:00
Dowon
53998d67f1 fix(scripts): revert exif prompt 2024-07-20 17:21:08 +09:00
Dowon
a17f97643e fix(scripts): fix default scheduler 2024-07-17 20:13:22 +09:00
Dowon
a479f60f40 feat(ui): use InputAccodian 2024-06-02 13:00:19 +09:00
Dowon
a79a472c6b fix: typeerror typo 2024-06-02 12:47:42 +09:00
Dowon
72647e5bfa fix: version requirements 2024-05-27 23:45:53 +09:00
Dowon
479f5f4a2e fix: hard english 2024-05-27 23:24:20 +09:00
Dowon
0fd53ce2f3 fix(setting): max taps, needs_reload_ui 2024-05-22 00:16:53 +09:00
Dowon
ad0271d6bc fix(scripts): 4 default taps 2024-05-20 00:13:51 +09:00
Dowon
2ace2759b8 feat(scripts): enable each tap 2024-05-19 16:25:06 +09:00
Dowon
ef7d413814 fix: always reset cached_c, uc 2024-05-17 18:10:18 +09:00
Dowon
9672046eeb fix: builtin scripts 2024-05-17 14:16:16 +09:00
Dowon
f12f66c298 refactor: refactor some functions 2024-05-15 22:13:06 +09:00
Dowon
e05104a220 fix: move traceback.py, ui.py 2024-05-15 21:55:33 +09:00
Dowon
7275213848 fix(scripts): fix extra models dir option label, example 2024-05-06 16:04:34 +09:00
Natans
dc451caaa2 Added option to add multiple extra models dirs separated by colons (#596)
* Added option to add multiple extra models dirs separated by colons

* Added "(requires Reload UI)" tag to the extra models path setting

* Changed colon seperator to in favor of vertical bar.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-06 16:02:14 +09:00
Dowon
93d223f130 fix(scripts): --no-prompt-history error 2024-04-17 19:47:08 +09:00
Dowon
0204ae3150 fix(modules): conditional imports 2024-04-14 17:00:55 +09:00
Dowon
3c27ab30ce fix(scripts): fix live preview None error 2024-04-14 16:57:40 +09:00
Dowon
d8df3b8111 fix(scripts): scheduler import error 2024-04-14 09:18:57 +09:00
Dowon
38e369305e feat(scripts): add scheduler option 2024-04-14 01:21:03 +09:00
Dowon
a40c4c77db fix(scripts): copy only non-callable extra params 2024-04-14 00:45:23 +09:00
Dowon
a2a49b3137 fix(scripts): move some p funcs 2024-04-14 00:37:14 +09:00
Dowon
890aa5ab34 fix(scripts): remove spaces on both side of [PROMPT] 2024-04-13 16:32:00 +09:00
Dowon
7d7dfb76a5 fix(scripts): move contextmanagers 2024-04-13 16:04:57 +09:00
Dowon
89ee330271 fix(scripts): fix paths 2024-04-13 15:49:03 +09:00
Dowon
ace61af2dd feat: update ad prompts in extra params
생성된 이미지에 wildcard 등을 적용했을 때, 적용된 결과가 exif에 이제 제대로 나타납니다.
2024-04-09 22:04:44 +09:00
Dowon
d0efa0fded fix: update adetailer prompt, negatives 2024-04-09 21:15:13 +09:00
Dowon
218e0ce94e fix: #569 no deepcopy 2024-04-09 21:09:58 +09:00
Dowon
f39ccbff14 style: remove trailing spaces 2024-04-09 21:07:32 +09:00
Nakadun
a0c49259b0 Fix extra parameter error from #552 (#569)
Fixes https://github.com/Bing-su/adetailer/issues/552
2024-04-09 21:06:33 +09:00
Dowon
a9de021070 style: remove unused import 2024-04-09 21:04:17 +09:00
Dowon
a0e6836b4e fix: /adetailer/v1/schema pydantic v2 2024-03-29 21:37:19 +09:00
Dowon
5b15c9fa40 fix: reduce validation error message 2024-03-29 21:35:09 +09:00
Dowon
3e10049e84 fix: txt2img inpainting mask?? error 2024-03-29 21:27:32 +09:00
Dowon
1ddace3d65 fix: resize img2img mask
타겟 이미지의 사이즈가 16의 배수가 아닐 때
2024-03-28 19:52:53 +09:00
Dowon
c083197684 fix: webui < 1.6.0 import error 2024-03-25 20:59:16 +09:00
Dowon
f185f602d2 fix: disable when inpaint with skip img2img
bug!
2024-03-21 19:40:26 +09:00
Dowon
9c6d98263a fix: mask size when using skip img2img 2024-03-21 18:59:57 +09:00
Dowon
55571ab646 fix: opencv image size mismatch error 2024-03-21 18:44:46 +09:00
Dowon
9d3f178573 fix: is_all_black - check image mode 2024-03-21 00:24:41 +09:00
Dowon
62d000e382 fix: invert mask image as inpainting mask invert 2024-03-16 23:21:07 +09:00