Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ControlNet API #162

Merged
merged 4 commits into from
Feb 10, 2024
Merged

ControlNet API #162

merged 4 commits into from
Feb 10, 2024

Conversation

huchenlei
Copy link
Contributor

@huchenlei huchenlei commented Feb 10, 2024

Description

Closes #110.
This PR adds back API support for ControlNet.

List of things achieved in this PR

  • Unittests for ControlNet API
  • Add processed.extra_images to API response
  • Fix the default value for many ControlNetUnit fields. The extra tailing , is making default value tuple of single item
  • Add back save_detected_map API only option
  • Parse ControlNet API payload

Note:
Now the only way to pass image/mask to ControlNet unit is

{
  "image": $base64string,
  "image_mask": $base64string,
  ...
}

All other syntax are no longer supported.

Screenshots/videos:

Checklist:

@huchenlei
Copy link
Contributor Author

Seems like inference with real SD model on CPU is too slow for ControlNet tests. Let me find a way to load empty model for tests.

@huchenlei huchenlei mentioned this pull request Feb 10, 2024
4 tasks
@huchenlei
Copy link
Contributor Author

Temporarily disable ControlNet tests in CQ. All tests passed locally.
1707545621763

@huchenlei huchenlei merged commit 5a7e755 into lllyasviel:main Feb 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Built in control net extention throws exception when used via API
2 participants