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

Restore '/controlnet/control_types' API endpoint #692

Closed

Conversation

altoiddealer
Copy link

Restores the '/controlnet/control_types' API endpoint, which is immensely useful for anyone using ControlNet via the API

Description

I recently opened an Issue on the main ControlNet extension repo Mikubill/sd-webui-controlnet#2737 suggesting that they add a new API endpoint to allow users to retrieve filtered data based on a Control Type, just like in the UI.

I was both shocked and immensely disappointed when they finally replied, stating that the endpoint does already exist!

I understand that Forge is a massive overhaul to A1111, so perhaps this aspect was removed to get everything working, and then just never reimplemented.

Whatever the case, this endpoint is truly amazing for using ControlNet via API. With only the 'models' and 'modules' endpoints, how the heck is someone to make a dynamic script? They would essentially have to take a fat chunk of existing ControlNet code, plus these few added functions, just to filter the data appropriately.

I'm an amateur coder, at best, however I'm quite confident about this implementation.

This uses your existing functions as best as possible, I believe, including your filter list and the check for currently loaded SD model version.

Please merge this.

Thank you

Screenshots/videos:

Restored

response_1714160176770.json

Checklist:

Restores the '/controlnet/control_types' API endpoint, which is immensely useful for anyone using ControlNet via the API
Copy link
Collaborator

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@huchenlei
Copy link
Collaborator

Merged into #713

@huchenlei huchenlei closed this May 23, 2024
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.

None yet

2 participants