Skip to content

Commit

Permalink
Validate ControlNetUnit using pydantic (#2847)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
huchenlei authored May 6, 2024
1 parent 1b95e47 commit e33c046
Show file tree
Hide file tree
Showing 23 changed files with 937 additions and 1,102 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ jobs:
wait-for-it --service 127.0.0.1:7860 -t 600
python -m pytest -v --junitxml=test/results.xml --cov ./extensions/sd-webui-controlnet --cov-report=xml --verify-base-url ./extensions/sd-webui-controlnet/tests
working-directory: stable-diffusion-webui
- name: Run unit tests
run: |
python -m pytest -v ./unit_tests/
working-directory: stable-diffusion-webui/extensions/sd-webui-controlnet/
- name: Kill test server
if: always()
run: curl -vv -XPOST http://127.0.0.1:7860/sdapi/v1/server-stop && sleep 10
Expand Down
Empty file added internal_controlnet/__init__.py
Empty file.
Loading

0 comments on commit e33c046

Please sign in to comment.