Commit Graph

132 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 784b6d01a7
Support PuLID (#2838)
* Add preprocessors

* Fix resolution param

* Fix various issues

* Add PuLID attn

* remove unused import

* Resize img before passing to facexlib

* safe unload
2024-05-04 12:25:00 -04:00
Chenlei Hu 3e95f393b8
Keep active preprocessor models (#2814) 2024-04-27 00:39:16 -04:00
Chenlei Hu 22f63dc2dc
Support lama inpaint and CLIP mask in `controlnet/detect` API endpoint (#2809)
* api

* notes

* Add tests

* nit

* nit

* nit

* Fix shuffle
2024-04-25 08:50:03 -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 bbcae309d1
Save/Use CLIP output in API (#2590)
* Add API support

* Add assertion

* Add test

* nit
2024-04-15 15:08:51 -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 44e0875956
Fix linter issues under script (#2667) 2024-02-28 23:58:34 -05:00
Chenlei Hu 0a8e71af58
🔧 Add option to run CLIP preprocessor on CPU (#2495) 2024-01-18 20:30:12 -05:00
liubo0902 b7a9bea231
fix image invert detect (#2356)
* fix image invert detect

*  Add unittest

---------

Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
2023-12-24 21:31:51 -05:00
青龍聖者@bdsqlsz 79948d8c29
Add Animal Pose Preprocessor (RTMPose AP-10K) (#2293)
* add support for animal pose

* Update __init__.py

* fix typo

* flatten json result list

* format files

* remove unused functions

* 🚧 Support edit

* nits

* fix test expecetations

---------

Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
2023-12-23 15:55:21 -05:00
Chenlei Hu a13bd2febe
Add render_openposes_json API endpoint (#2325)
* Add render_openpose_json API endpoint

* nits
2023-12-12 22:07:52 -05:00
catboxanon bd6bc48629
Fix missing typing for `List` 2023-09-09 10:34:08 -04:00
lllyasviel 1d5402326d
sdxl support (for SAI/HuggingFace/diffuser/community models) (#1952)
sdxl support (for SAI/HuggingFace/diffuser/community models)
1.1.400
2023-09-04 10:41:42 -07:00
Chenlei Hu 664ac74cae
Relands #2033 (#2038)
* 🎨 re-format api.py

* Add pose json to api response

* Simplify response format

* fix
2023-09-04 09:06:46 -04:00
lllyasviel 7bdcb9079a Revert "Add openpose json to API response (#2033)"
This reverts commit e2cd3b91a8.
2023-09-04 05:38:19 -07:00
Chenlei Hu e2cd3b91a8
Add openpose json to API response (#2033)
* 🎨 re-format api.py

* Add pose json to api response

* Simplify response format
2023-09-03 17:33:05 -04:00
Leon ff7aad9a70
update model_list to allow to set whether to update model (#1828)
* update model_list to allow to set whether to update model

* update model_list to allow to set whether to update model
2023-07-26 08:43:53 -04:00
Abdullah Alfaraj b4cdd10283
[API]: expose the filter functionality to api (#1667)
* [API]: expose the filter functionality to the api

* add basic unit_test for the filter api endpoint

* rename filter_list to filter

* 🚧 Return all filters throught API call

---------

Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
2023-07-17 23:38:50 -04:00
Chenlei Hu d3b64fbdd5
Reland logs; debug (#1540)
fallback
2023-06-04 13:55:45 -04:00
Chenlei Hu b0a7dc8864
Revert "Logging migration (#1537)" (#1538)
This reverts commit f7eeb481ea.
2023-06-03 19:13:16 -04:00
Chenlei Hu f7eeb481ea
Logging migration (#1537)
* 🔊 Use logger to replace print in scripts

* 🐛 Fix double handler issue
2023-06-03 18:14:56 -04:00
Abdullah Alfaraj 974e593b73
fetch control_net_max_models_num settings from the api (#1402) 2023-05-24 18:19:21 -07:00
huchenlei ca3252598b 🔧 Add cmd args to set cache size 2023-05-21 14:12:36 -04:00
unknown 79ef6172b0 add get_modules_detail in externalcode 2023-05-06 23:49:11 +08:00
unknown 71f6df02a2 add module_detail in /controlnet/module_list containing sliders config and reuse code with controlnet.build_sliders 2023-05-06 06:23:50 +08:00
ljleb 11d33e1815
Remove deprecated api (#1154)
* remove deprecated api

* version

* api version
2023-05-05 12:05:33 -04:00
ramyma 5d387abf19
fix: Raise 500 exception instead of returning an error on `detect` API call (#863)
fix: Raise 422 exception instead of returning an error on `detect` API call
2023-05-03 22:03:32 -04:00
ljleb 8800dd003b add alias names to external code api as well 2023-04-25 20:31:44 -04:00
ljleb 5afda4143f request param is alias_names 2023-04-25 20:20:03 -04:00
ljleb eb3e60672a add api module alias 2023-04-25 20:10:22 -04:00
lvmin 1404f946dd see if pass test, 3rd attempt 2023-04-19 23:59:34 -07:00
lvmin ff4c8ada75 fix api 2023-04-19 23:35:41 -07:00
lvmin c07a140cdd use text consistent to a1111 resizing 2023-04-18 00:56:21 -07:00
ljleb 14f3661648
forward web api to external_code api (#850) 2023-04-18 00:57:15 -04:00
lvmin 86873af29e fix tests 2023-04-17 17:22:14 -07:00
Joseph Catrambone 385b67c2e3 Merge upstream changes and resolve merge conflicts. 2023-04-17 09:35:49 -07:00
kft334 c955472be1
Update detect endpoint 2023-04-17 01:11:02 -04:00
lvmin c8d7c78660 fix api 2023-04-16 19:41:44 -07:00
lllyasviel bee146aa10
Merge branch 'main' into lvmin 2023-04-16 17:20:56 -07:00
lvmin e6d3a326c4 add tile and xdog 2023-04-16 17:18:12 -07:00
lllyasviel e900a87aaa
Merge pull request #803 from Mikubill/lvmin
restore default to inner fit
2023-04-16 01:15:00 -07:00
lvmin 786531a647 restore default to inner fit 2023-04-16 01:13:19 -07:00
lllyasviel a9e11f7d01
Merge pull request #786 from Mikubill/lvmin
low vram vs shuffle
2023-04-15 20:08:22 -07:00
lvmin 7a1eacc92e low vram vs shuffle 2023-04-15 20:07:32 -07:00
lllyasviel 33608671ca
Merge pull request #782 from Mikubill/lvmin
typo
2023-04-15 18:10:23 -07:00
lvmin 5bb5460588 typo 2023-04-15 18:10:00 -07:00
kft334 dfe4e0e322
Update detect endpoint
Updated to be consistent with the webui preprocessor naming.

Typo note: t2ia_color_gird should be changed to t2ia_color_grid in the list of webui preprocessors.
2023-04-15 20:51:34 -04:00
kft334 edf7cd0a42
Update api.py 2023-04-15 17:22:42 -04:00
kft334 76d413c586
Update detect endpoint 2023-04-15 16:52:32 -04:00