Commit Graph

13 Commits (58f620c921030eea0f3528d68849f7e052d44e3f)

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 9e61022428
🔧 Support SDXL in tests (#2254)
* 🔧 Support SDXL in tests

* 📝 docs

* nits
2023-11-12 14:12:54 -05: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 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