261 Commits

Author SHA1 Message Date
Dowon
06100063b3 feat: change unsafe pickling 2025-02-18 20:40:27 +09:00
Dowon
cb69a52fb3 update pre-commit 2024-12-02 22:18:44 +09:00
Dowon
424093bbd8 fix(scripts): LANCZOS 2024-11-02 22:25:55 +09:00
Dowon
9de46de1d2 Merge remote-tracking branch 'origin/main' into dev 2024-09-25 20:13:04 +09:00
Collin Avidano
9ceb58685a Feature: Filter k most confident masks (#720)
* add filter to things that return confidences need to add ui elements to select between the two methods

* add ui elements for controlling method

* forgot to remove this

* fix incorrect early exit

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

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

* fix: pop mask only top k params

* fix: filter confidences

* refactor: change to one public function

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dowon <ks2515@naver.com>
2024-09-25 20:12:28 +09:00
Dowon
c439128484 refactor(scripts): optimize get_override_settings method
Refactor the get_override_settings method in the AfterDetailerScript class to improve code readability and maintainability. Removed unused parameter '_p' and added type hints for better code documentation.
2024-09-22 23:54:21 +09:00
Dowon
feefeed638 fix(scripts): fix optioninfo, add xyz options 2024-09-17 19:42:42 +09:00
Dowon
ceacc711e4 fix(scripts): copy scripts args
maybe fix #701
2024-09-09 22:13:58 +09:00
Dowon
0a1fd3a4af fix(scripts): get image mask ensure L mode 2024-08-30 20:12:18 +09:00
Dowon
91f7d8617a fix(scripts): init image controlnet error 2024-08-27 19:18:00 +09:00
Dowon
fabb7ded2b fix(script): missing get_ad_model 2024-08-25 15:13:25 +09:00
Dowon
47cc6b9070 fix(scripts): misc 2024-08-25 14:51:05 +09:00
Dowon
6090dcdaa9 fix(scripts): fix is ad enabled 2024-08-24 19:14:10 +09:00
Dowon
cbd60739e8 fix(scripts): move empty check 2024-08-24 13:59:34 +09:00
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