Commit Graph

58 Commits

Author SHA1 Message Date
GavChap
77bdb9208d
Add cos xl (#710)
* Add V_PREDICTION_EDM handing for CosXL models

Add V_PREDICTION_EDM handing for CosXL models

* Get correct sigmas from checkpoint.

* Round to 3 sig digs in order to make compatible with comfy implementation

* Add sigma data like ComfyUI has

---------

Co-authored-by: Gavin Chapman <gchapman@MAINPC>
2024-05-23 16:42:56 -04:00
Chakib Benziane
49c3a080b5
implement align your steps scheduler (#726)
Signed-off-by: blob42 <contact@blob42.xyz>
2024-05-22 15:11:10 -04:00
Chenlei Hu
d5cc799eec
Only feed image embed to instant id ControlNet unit (#309)
* Only feed image embed to instant id ControlNet units

* Add tests

* Add more tests
2024-05-02 18:30:54 -04:00
lllyasviel
e48533bdcd change patcher method 2024-03-07 00:26:17 -08:00
lllyasviel
95bcea72b1
Revert "fix alphas cumprod (#475)"
This reverts commit 72139b000c.
2024-03-03 22:40:56 -08:00
Chengsong Zhang
72139b000c
fix alphas cumprod (#475) 2024-03-03 20:09:04 -06:00
lllyasviel
ef35383b4a
VAE patcher and more types of unet patches 2024-02-29 22:37:34 -08:00
lllyasviel
056d4d0f91 fix for neveroom extension 2024-02-25 16:47:02 -08:00
lllyasviel
a0c89fae12 fix ci 2024-02-25 11:24:56 -08:00
lllyasviel
5e5b60b5b1 rework lora loading
and add logs
2024-02-25 11:04:14 -08:00
lllyasviel
437c348926 Add build-in extension "NeverOOM"
see also discussions
2024-02-24 19:09:06 -08:00
lllyasviel
434ca2169f
Add optimization --cuda-stream
See also the readme for more details
2024-02-24 14:00:48 -08:00
lllyasviel
0f09d98814 revise memory formulation for special amd like #343 2024-02-24 09:36:52 -08:00
lllyasviel
79bdb78619 less verbose 2024-02-23 22:31:16 -08:00
lllyasviel
d508d8132f add cmd flag hints 2024-02-23 20:06:08 -08:00
lllyasviel
88f395091b
add two optimizations
--pin-shared-memory and --cuda-malloc

See also the updates in Readme for more details
2024-02-23 18:39:32 -08:00
lllyasviel
54c89503eb Disable pin page
This is an emergency fix

GTX 1060/1050/1066 either does not have shared GPU page vram or have less than 2GB shared page vram - pinning any tensors larger than that will crash

Solution is still under investigation.
2024-02-23 16:43:08 -08:00
lllyasviel
2a7fb1be24 less verbose 2024-02-23 14:22:37 -08:00
lllyasviel
ad0ce480f9 always print time 2024-02-23 13:02:30 -08:00
lllyasviel
df12dde12e
Rework unload system
Previous repeated loading (on cn or other extensions) is fixed. ControlNet saves about 0.7 to 1.1 seconds on my two device when batch count > 1. 

8GB VRAM can use SDXL at resolution 6144x6144 now, out of the box, without tiled diffusion or other things. 

(the max resolution on Automatic1111 txt2img UI is 2048 but one can highres fix to try 6144 or even 8192)
2024-02-23 12:58:09 -08:00
lllyasviel
19473b1a26 fix ci 2024-02-23 09:44:08 -08:00
lllyasviel
26c325296e
rework memory computation for async loader (#377) 2024-02-23 09:24:39 -08:00
lllyasviel
eacb14e115 tune threshold based on more test devices
for async mover
2024-02-22 17:18:31 -08:00
lllyasviel
8283774b86 revise caster 2024-02-22 10:24:27 -08:00
lllyasviel
6ebef20db3 avoid potential OOM caused by computation being slower than mover
avoid OOM (or shared vram invoking) caused by computation being slower than mover (GPU filled with loaded  but uncomputed tensors), by setting the max async overhead to 512MB
2024-02-22 08:24:23 -08:00
lllyasviel
167dbc6411 safe value for new memory peak 2024-02-22 06:31:21 -08:00
lllyasviel
539bc5035d safe cleanup to avoid potential problems 2024-02-22 01:28:38 -08:00
lllyasviel
4080e25805 add todo note 2024-02-22 00:47:26 -08:00
lllyasviel
846fdc3341 also implement async offload to control-lora
controlnet, t2iadapters, etc
2024-02-22 00:20:35 -08:00
lllyasviel
638ee43bf1 Merge upstream PR 14855 2024-02-21 23:59:40 -08:00
lllyasviel
3cdae09639 try solve saturation problems for instant id in #155 2024-02-11 20:53:17 -08:00
lllyasviel
237f80681a add more notes to clip codes 2024-02-11 20:28:02 -08:00
lllyasviel
30dd8af08c fix error in head info 2024-02-11 20:12:27 -08:00
lllyasviel
3d039591fe Expand head info in files
Previously before this commit, credits are already in entry and licenses are already in root. This commit will make info clearer.
2024-02-11 19:55:18 -08:00
lllyasviel
998327c744 add edit model 2024-02-10 03:24:40 -08: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
dca0a1d5d8
Integrate Multi Diffusion
Integrated Multi Diffusion, based on codes from pkuliyi2015 and shiimizu
Basic Diffusion test passed
ControlNet test passed
2024-02-09 18:37:32 -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
ac4a8820a5
Fix CQ tests (#141)
* Make test client run on cpu

* test on cpu

try fix device

try fix device

try fix device

* Use real SD1.5 model for testing

* ckpt nits

* Remove coverage calls
2024-02-09 16:33:05 -05:00
lllyasviel
4c9db26541 support controlnet_model_function_wrapper for t2i-adapter 2024-02-07 21:42:56 -08:00
lllyasviel
49ec325f6a lin 2024-02-07 20:14:02 -08:00
lllyasviel
a1670c536d Allow controlnet_model_function_wrapper
for animatediff to manage controlnet batch slicing window
2024-02-07 20:06:23 -08:00
lllyasviel
ef781cabcb Backend: Allow control signal to be none for advanced weighting 2024-02-07 13:02:42 -08:00
lllyasviel
c185e39e59 Backend: better controlnet mask batch broadcasting 2024-02-06 20:13:09 -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 63c527c373383f7eb99e134ca6b298bc613ac4ca.

* 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
88f6df4dcd add_sampler_pre_cfg_function 2024-02-05 14:48:43 -08:00
lllyasviel
40afb9dfb0 backend 2024-02-05 00:45:34 -08:00
lllyasviel
abcfd6bf97 backend 2024-02-04 15:40:02 -08:00
lllyasviel
412bc10a01 update examples 2024-01-31 23:29:56 -08:00
lllyasviel
a203113f43 qol 2024-01-31 23:21:58 -08:00