Commit Graph

22 Commits (8a8a42e4168c7edf89ff7030232f87ae3ee56b8b)

Author SHA1 Message Date
Chenlei Hu e33c046158
Validate ControlNetUnit using pydantic (#2847)
* Add Pydantic ControlNetUnit

Add test config

Add images field

Adjust image field handling

fix various ui

Fix most UI issues

accept greyscale image/mask

Fix infotext

Fix preset

Fix infotext

nit

Move infotext parsing test

Remove preset

Remove unused js code

Adjust test payload

By default disable unit

refresh enum usage

Align resize mode

change test func name

remove unused import

nit

Change default handling

Skip bound check when not enabled

Fix batch

Various batch fix

Disable batch hijack test

adjust test

fix test expectations

Fix unit copy

nit

Fix test failures

* Change script args back to ControlNetUnit for compatibility

* import enum for compatibility

* Fix unit test

* simplify unfold

* Add test coverage

* handle directly set np image

* re-enable batch test

* Add back canvas scribble support

* nit

* Fix batch hijack test
2024-05-06 15:40:34 -04:00
Chenlei Hu abafad27fc
Drop external_code. prefix (#2850)
* Drop external_code. prefix

* Remove unused imports
2024-05-05 11:06:15 -04:00
Chenlei Hu ef65fec031
Move enum (#2845)
* Move enums to enums.py

* Add missing import

* Remove unused import
2024-05-04 17:56:51 -04:00
Chenlei Hu 442398bb9f
Port SDForge's preprocessor structure (#2754)
* wip

* wip2

* wip3

* fix issues

* Add scribble xdog

* port legacy processors

* nit

* Add tests

* Fix modules test

* Add back normal_dsine

* Remove legacy code

* Remove code

* Add tests

* rename param

* Linter ignore

* fix is_image

* fix is_image

* nit

* nit

* Better assertion message

* Add back ip-adapter-auto

* Add test

* Fix various tag matching

* fix

* Add back preprocessor cache

* Add back sparse ctrl

* fix test failure

* Add log
2024-04-17 22:28:56 -04:00
Chenlei Hu 8af7577c45
Change API processor_res/threshold_a/threshold_b default values (#2746)
* Change API threshold_a/threshold_b/res default values

* move code

* Add tests

* update test

* Add log_context for testing

* More test

* nit

* encoding

* Change cq log encoding
2024-04-15 09:46:14 -04:00
Chenlei Hu af9c3cdb9c
🔨 Refactor choose_input_image logic (#2468)
*  Add inpaint full cov tests

* More tests

* 🔨 Refactor choose input image logic

*  Update unittest expectation

* nits
2024-01-14 18:58:39 -05:00
Chenlei Hu 3216fba6ed
🐛 Fix infotext advanced weighting (#2408) 2024-01-04 17:02:44 -05:00
Chenlei Hu 45eb903538
Filter cn model by sd version active (#2267) 2023-11-19 17:49:46 -05:00
Chenlei Hu 9e61022428
🔧 Support SDXL in tests (#2254)
* 🔧 Support SDXL in tests

* 📝 docs

* nits
2023-11-12 14:12:54 -05:00
Chenlei Hu 27c522029e
Fix CI tests (#2220)
* 🔧 setup CI

* 🐛 Fix path

* cd

* set working dir

* fix openpose tests

* Fix web_api tests

* Fix batch hijack tests

* change coverage dir

* 📝 Add doc
2023-11-04 00:48:22 -04:00
catboxanon cde4619c5d
Repair ControlNet infotext parsing (#1833)
* Repair infotext parsing

🚧 Listen png info buttons

WIP

New infotext format

nits

nits

nits

rebase

refactor active unit counts

* nits

* nit

---------

Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
2023-08-23 22:27:34 -04:00
storyicon 17e9ca6c3b
feat: update get_unique_axis0 (#1567)
Signed-off-by: storyicon <yuanchao@bilibili.com>
2023-07-03 16:02:04 -04:00
Chenlei Hu 0b7f43107c
Add unittest on numpy random seed (#1698) 2023-06-23 20:55:15 -04:00
Chenlei Hu c02375a435
Add test on choose_input_image (#1691) 2023-06-23 14:58:37 -04:00
Chenlei Hu 16805be062
[Reland] 🔨 Refactor bound check for threshold and resolution (#1675)
* 🔨 Refactor bound check for threshold and resolution (#1668)

* 🔨 Refactor bound check for threshold and resolution

* nits

* 🐛 Fix bound check. Add more unittest.

* Fix param value used in logs
2023-06-22 21:38:12 -04:00
Chenlei Hu 18a7abdd7f
Add `preview as input` button (#1529)
*  Allow use preview

* 🐛 fix kwargs issue
2023-06-04 14:06:55 -04:00
Chenlei Hu 591b3de809
[Reland] Extract Prepare Mask logic (#1528)
* 🔨 Extract prepare mask logic

* 🐛 return Image instead of nparray

* 🐛 rename variable so that same variable always have same type

* 🎨 nits
2023-06-02 22:18:56 -04:00
lllyasviel 3c41f1546e
Revert "Extract prepare mask logic (#1525)" (#1527)
This reverts commit d7faaa491c.
2023-06-02 18:51:41 -07:00
Chenlei Hu d7faaa491c
Extract prepare mask logic (#1525)
* 🔨 Extract prepare mask logic

* 🐛 return Image instead of nparray
2023-06-02 21:05:05 -04:00
huchenlei bbe357e6ac Add cache for preprocessors 2023-05-21 13:36:03 -04:00
ljleb 3476c48d8d fix tests 2023-05-05 16:27:40 -04:00
ljleb 07ef8a750a
Multi-ControlNet Batch (#683)
* add back preprocessor

* reload imports for people that update without restarting webui

* remeove img2img tab tracker (replaced by batch hijack)

* batch hijack script

* update gradio ui

* new options (used by batch hijack)

* demeter violation

* clear detected_map

* bug fixes, boys scout and whitespace

* demeter (tests)

* batch tests

* fix alwayson script args in api tests

* extract cn unit image type

* update instead of buggy set

* update readme

* carousel -> gallerie output

* fix index in unit batch iterator

* fix hook unregistering all callbacks

* dont modify hook

* fix non-cn batch

* fix responsiveness

* dont need queue here

* state no change

* readme

* name

* fix ui, bump version

* loopback less important

* interrupt batch if no input image

* keep batch mode in sync

* typo
2023-04-23 16:35:31 -04:00