Commit Graph

123 Commits

Author SHA1 Message Date
layerdiffusion 9a449a1d98 remove annoying control model version filter
thanks god
2024-08-02 20:33:58 -07:00
altoiddealer 0eea1acc6e Restore '/controlnet/control_types' API endpoint (#912)
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)
2024-08-01 12:48:30 -07:00
layerdiffusion e26abf87ec Gradio 4 + WebUI 1.10 2024-07-26 12:02:46 -07:00
lllyasviel ae51178629 allow extensions to sort themselves in UI
and other installed extensions will be on top now (including some resolution related UI extensions)
2024-02-17 08:15:29 -08:00
lllyasviel d81e353d89 fix outpaint in inpaint_only+lama
the problem in inpaint_only+lama+"Resize and Fill" is fixed now.
SDXL+inpaint_only+lama+"Resize and Fill"+inpaint_fooocus_v26+"stop at 0.5 or 0.6" can be used as one SOTA outpaint method now
2024-02-14 02:45:23 -08:00
lllyasviel fa8be06613 fix tile-colorfix problems
This will completely solve problems related to tile-colorfix and now tile colorfix/colorfix+sharp give same results to webui-cn
2024-02-14 02:19:04 -08:00
Chenlei Hu 8316773caa Fix inpaint mask in API (#188)
* Fix inpaint mask in API

* Add more tests

* Add tests
2024-02-11 11:49:21 -05:00
Chenlei Hu e11753ff84 Fix controlnet/detect API endpoint (#187) 2024-02-11 01:15:06 -05:00
Chenlei Hu 6a854fcb38 Add documentation on ControlNetUnit (#176)
* remove dict from any

* nit

* nit
2024-02-10 22:30:22 -05:00
lllyasviel ce21e7afe4 fix degradation 2024-02-09 23:09:01 -08:00
Chenlei Hu 5a7e755528 ControlNet API (#162)
* ControlNet API

* update cache key

* nits

* disable controlnet tests
2024-02-10 01:16:13 -05:00
Chengsong Zhang ee565b337c ControlNet batch fix (#113)
* cn forward patcher

* simplify

* use args instead of kwargs

* postpond moving cond_hint to gpu

* also do this for t2i adapter

* use a1111's code to load files in a batch

* revert

* patcher for batch images

* patcher for batch images

* remove cn fn wrapper dupl

* remove shit

* use unit getattr instead of unet patcher

* fix bug

* small changte
2024-02-09 21:55:29 -06:00
lllyasviel 4ec1015162 fix mask can be none 2024-02-09 18:25:44 -08:00
lllyasviel fb2e271668 support inpaint models from fooocus
put inpaint_v26.fooocus.patch in models\ControlNet, control SDXL models only
To get same algorithm as Fooocus, set "Stop at" (Ending Control Step) to 0.5
Fooocus always use 0.5 but in Forge users may use other values.
Results are best when stop at < 0.7. The model is not optimized with ending timesteps > 0.7
Supports inpaint_global_harmonious, inpaint_only, inpaint_only+lama.
In theory the inpaint_only+lama always outperform Fooocus in object removal task (but not all tasks).
2024-02-09 17:08:48 -08:00
Chenlei Hu 200f2b69ed Add back ControlNet model version filter (#131)
* Add back ControlNet model version filter

* Update choice after sd model changes
2024-02-09 16:34:09 -05:00
lllyasviel 472a510151 try fix control mode weighting #155 2024-02-09 13:23:49 -08:00
Chenlei Hu e1faf8327b Add back ControlNet HR option (#90)
* Add back ControlNet HR option

* nits

* protect kernel

* add enum

* fix

* fix

* Update controlnet.py

* restore controlnet.py

* hint ui

* Update controlnet.py

* fix

* Update controlnet.py

* Backend: better controlnet mask batch broadcasting

* Update README.md

* fix inpaint batch dim align #94

* fix sigmas device in rare cases #71

* rework sigma device mapping

* Add hr_option to infotext

---------

Co-authored-by: lllyasviel <lyuminzhang@outlook.com>
2024-02-07 11:09:52 -05:00
Chenlei Hu 1110183943 Fix ControlNet UI preset (#87) 2024-02-06 21:52:04 -05:00
lllyasviel 711844ecd8 solve #76 2024-02-06 17:25:28 -08:00
lllyasviel 70ae2a4bce fix controlnet ignored in batch #55 2024-02-06 17:12:57 -08:00
lllyasviel fc5c70a28d gradio fix 2024-02-06 14:32:42 -08:00
Chengsong Zhang b58b0bd425 batch mask (#44)
* mask batch, not working

* mask batch, working, infotext broken

* try remove old codes

* set CUDA_VISIBLE_DEVICES with args

* Revert "try remove old codes"

This reverts commit 63c527c373.

* Update controlnet_ui_group.py

* readme

* 🐛 Fix infotext

---------

Co-authored-by: lllyasviel <lyuminzhang@outlook.com>
Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
2024-02-06 12:54:35 -06:00
lllyasviel affb40340e infotext quickfix 2024-02-04 22:38:47 -08:00
lllyasviel e02b69aa0c Update controlnet.py 2024-02-04 22:33:02 -08:00
lllyasviel a4d64adb32 loop 2024-02-04 22:21:38 -08:00
lllyasviel a8c43f7af0 batch support 2024-02-04 22:04:20 -08:00
lllyasviel c6f7fa82ff ini batch 2024-02-04 21:43:17 -08:00
lllyasviel 4b6cd359e9 rename 2024-02-04 21:05:05 -08:00
lllyasviel 8dc2cb98b4 Update controlnet_ui_group.py 2024-02-04 20:50:07 -08:00
lllyasviel a433268db4 register batch and multi input in unit 2024-02-04 20:49:40 -08:00
lllyasviel 54e3cea685 version filter broken after model switch 2024-02-04 14:06:47 -08:00
Chenlei Hu 1aaff72d47 Fix unit header style (#37) 2024-02-03 23:05:04 -05:00
Chenlei Hu 83277b15f4 Add option to disable thumbnail display (#36) 2024-02-03 22:30:30 -05:00
Chenlei Hu 1ed747d5f9 Create empty mask canvas with generation target's width/height (#35) 2024-02-03 22:23:36 -05:00
Chenlei Hu bafb2bce54 Display thumbnail of input image and mask on folded unit header (#33)
* Add input thumbnail to unit header

* handle hand drawn mask

* Update mask logic
2024-02-03 22:00:18 -05:00
Chenlei Hu f2b1ee09d4 Filter ControlNet model based on active SD's version (#32) 2024-02-02 23:17:18 -05:00
Chenlei Hu 4f0152fed9 Auto open unit accordion (#31) 2024-02-02 22:51:12 -05:00
lllyasviel 90010e6612 Update controlnet.py 2024-02-02 19:50:31 -08:00
lllyasviel 99a7f5321d Update controlnet.py 2024-02-02 19:38:03 -08:00
lllyasviel 28e332c9a7 what 2024-02-02 19:27:52 -08:00
lllyasviel db7bd0e4a8 try open first unit 2024-02-02 16:43:09 -08:00
Chenlei Hu 3e80e11309 Add back enabled checkbox and sync (#30)
* Add back enabled checkbox and sync

* Better state management
2024-02-02 17:57:45 -05:00
lllyasviel 1b60a0f804 add notes 2024-02-02 14:50:51 -08:00
Chenlei Hu 6c3194147c Fix infotext (#28) 2024-02-02 17:31:20 -05:00
huchenlei 7a3cb322dc 🔥 remove unused code 2024-02-02 17:06:28 -05:00
huchenlei 79eb31b074 Put unit in accordions 2024-02-02 17:01:20 -05:00
lllyasviel 98b0d7a999 remove shits 2024-02-02 01:17:50 -08:00
lllyasviel a9212b640f photomaker 2024-02-01 22:57:49 -08:00
lllyasviel 4b27699e65 masked cnet 2024-02-01 21:48:58 -08:00
lllyasviel 9f6ee2a688 ini mask support 2024-02-01 21:21:41 -08:00