-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Request]: New API Endpoint - Post Control Type to Get Filtered Data #2737
Comments
We already have
Revelant code: sd-webui-controlnet/scripts/api.py Lines 70 to 92 in 22f63dc
|
At first I thought you were pulling my leg, but you are 100% correct. Hot damn that is amazing! This is a colossal blunder by sd-webui-forge - I made this report because I thought ControlNet lacked such an API endpoint. ...Wrong! Only Forge is missing it. SMH. This is immensely useful. Such a shame that Forge doesn't have it. |
@huchenlei proud to say, I actually made this happen. I consider myself a bottom tier coder, but after a crap ton of guess-and-check and asking ChatGPT for help I managed to do this thing. Now, hopefully Forge merges this. |
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: <img width="1136" alt="Restored" src="https://github.com/lllyasviel/stable-diffusion-webui-forge/assets/1613484/8996c3f2-27be-4405-b0cd-7f05f3eaa2d2"> [response_1714160176770.json](https://github.com/lllyasviel/stable-diffusion-webui-forge/files/15134692/response_1714160176770.json) ## Checklist: - [X] I have read [contributing wiki page](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing) - [X] I have performed a self-review of my own code - [X] My code follows the [style guidelines](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing#code-style) - [X] My code passes [tests](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Tests)
Is there an existing issue for this?
What happened?
As of this writing, the ControlNet API endpoints are few and barely helpful.
POST Detect is probably the most useful, and I don't have any use for it.
....The thought of filtering these lists on the user end is absurd.
The ControlNet script has those amazing functions for filtering the data in the UI, based simply on "Control Type" and checking the current SD Model.
It would be super duper awesome to be able to get a dictionary response containing all that filtered data via API request!!
Glorious filtered data... I want you so badly via API
Steps to reproduce the problem
What should have happened?
An API endpoint to get that juicy filtered data would be freakin' sweet.
Commit where the problem happens
webui: Current
controlnet: Current
What browsers do you use to access the UI ?
No response
Command Line Arguments
List of enabled extensions
ControlNet
Console logs
Additional information
No response
The text was updated successfully, but these errors were encountered: