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

Fixing implementation of ControlNet-XS #6772

Merged
merged 92 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
2426799
CheckIn - created DownSubBlocks
UmerHA Jan 9, 2024
1c36d0b
Added extra channels, implemented subblock fwd
UmerHA Jan 9, 2024
9626ce3
Fixed connection sizes
UmerHA Jan 10, 2024
b45de06
checkin
UmerHA Jan 10, 2024
eb9c59e
Removed iter, next in forward
UmerHA Jan 10, 2024
32bf5a7
Models for SD21 & SDXL run through
UmerHA Jan 11, 2024
b58572b
Added back pipelines, cleared up connections
UmerHA Jan 12, 2024
2b73d02
Cleaned up connection creation
UmerHA Jan 12, 2024
93f9d7d
added debug logs
UmerHA Jan 15, 2024
36bb8f9
updated logs
UmerHA Jan 15, 2024
0878d37
logs: added input loading
UmerHA Jan 15, 2024
72b29de
Update umer_debug_logger.py
UmerHA Jan 15, 2024
773721f
log: Loading hint
UmerHA Jan 15, 2024
c6c831a
Update umer_debug_logger.py
UmerHA Jan 15, 2024
d20d4bf
added logs
UmerHA Jan 16, 2024
8145d36
Changed debug logging
UmerHA Jan 16, 2024
d657233
debug: added more logs
UmerHA Jan 16, 2024
1aa848c
Fixed num_norm_groups
UmerHA Jan 17, 2024
f2e6366
Debug: Logging all of SDXL input
UmerHA Jan 17, 2024
507abfa
Update umer_debug_logger.py
UmerHA Jan 17, 2024
5641711
debug: updated logs
UmerHA Jan 17, 2024
4039338
checkim
UmerHA Jan 18, 2024
d7c8d43
Readded tests
UmerHA Jan 18, 2024
1d8d5b8
Removed debug logs
UmerHA Jan 18, 2024
55b7350
Fixed Slow Tests
UmerHA Jan 19, 2024
6214da7
Added value ckecks | Updated model_cpu_offload_seq
UmerHA Jan 19, 2024
54bb91d
accelerate-offloading works ; fast tests work
UmerHA Jan 25, 2024
a709ef8
Made unet & addon explicit in controlnet
UmerHA Jan 26, 2024
eecf9a5
Updated slow tests
UmerHA Jan 26, 2024
15affe3
Added dtype/device to ControlNetXS
UmerHA Jan 26, 2024
08c8e31
Filled in test model paths
UmerHA Jan 26, 2024
8828586
Added image_encoder/feature_extractor to XL pipe
UmerHA Jan 26, 2024
72fce3e
Fixed fast tests
UmerHA Jan 30, 2024
1511d7d
Added comments and docstrings
UmerHA Jan 30, 2024
6041bb1
Fixed copies
UmerHA Jan 30, 2024
1cdcb27
Added docs ; Updates slow tests
UmerHA Jan 30, 2024
112dd80
Merge remote-tracking branch 'upstream/main' into controlnetxs-2
UmerHA Jan 30, 2024
42920a9
Moved changes to UNetMidBlock2DCrossAttn
UmerHA Jan 30, 2024
b14b70c
tiny cleanups
UmerHA Jan 30, 2024
c163fcb
Removed stray prints
UmerHA Jan 30, 2024
145037d
Removed ip adapters + freeU
UmerHA Jan 31, 2024
0be0d6f
Fixed test_save_load_float16
UmerHA Jan 31, 2024
3c1ec38
Merge remote-tracking branch 'upstream/main' into controlnetxs-2
UmerHA Feb 1, 2024
a21479e
Make style, quality, fix-copies
UmerHA Feb 1, 2024
dcd7630
Merge branch 'main' into controlnetxs-2
UmerHA Feb 9, 2024
a31aa90
Merge branch 'main' into controlnetxs-2
UmerHA Feb 25, 2024
d47061e
Merge branch 'huggingface:main' into controlnetxs-2
UmerHA Feb 28, 2024
e2d009c
Changed loading/saving API for ControlNetXS
UmerHA Feb 29, 2024
2bca2ca
Removed ControlNet-XS from research examples
UmerHA Feb 29, 2024
4185e86
Make style, quality, fix-copies
UmerHA Feb 29, 2024
ec43807
Merge remote-tracking branch 'upstream/main' into controlnetxs-2
UmerHA Feb 29, 2024
49049cb
Small fixes
UmerHA Feb 29, 2024
7dd6b05
checkin May 11 '23
UmerHA Mar 11, 2024
5618c95
CheckIn Mar 12 '24
UmerHA Mar 12, 2024
da96576
Fixed tests for SD
UmerHA Mar 13, 2024
90a6a50
Added tests for UNetControlNetXSModel
UmerHA Mar 14, 2024
ef65127
Fixed SDXL tests
UmerHA Mar 14, 2024
f68477b
cleanup
UmerHA Mar 14, 2024
8742e90
Merge branch 'main' into controlnetxs-2
UmerHA Mar 14, 2024
8521ed2
Delete Pipfile
UmerHA Mar 14, 2024
ec33935
Merge branch 'controlnetxs-2' of https://github.com/UmerHA/diffusers …
UmerHA Mar 14, 2024
d694764
Merge branch 'huggingface:main' into controlnetxs-2
UmerHA Mar 20, 2024
ea69d3c
CheckIn Mar 20
UmerHA Mar 20, 2024
f3f569b
check-in Mar 23
UmerHA Mar 23, 2024
56d69fe
checkin 24 Mar
UmerHA Mar 24, 2024
395716a
Created init for UNetCnxs and CnxsAddon
UmerHA Mar 24, 2024
987e4c9
CheckIn
UmerHA Mar 24, 2024
890542b
Made from_modules, from_unet and no_control work
UmerHA Mar 25, 2024
a272300
make style,quality,fix-copies & small changes
UmerHA Mar 25, 2024
618f3a2
Fixed freezing
UmerHA Mar 25, 2024
586fc18
Added gradient ckpt'ing; fixed tests
UmerHA Mar 26, 2024
34e9fdf
Fix slow tests(+compile) ; clear naming confusion
UmerHA Mar 26, 2024
f735df1
Merge branch 'main' into controlnetxs-2
UmerHA Mar 26, 2024
1e37e8e
Don't create UNet in init ; removed class_emb
UmerHA Apr 3, 2024
7f8ccb4
Merge branch 'main' into controlnetxs-2
UmerHA Apr 3, 2024
9931030
Incorporated review feedback
UmerHA Apr 3, 2024
60aa158
Merge branch 'controlnetxs-2' of https://github.com/UmerHA/diffusers …
UmerHA Apr 3, 2024
18ded9d
Make style, quality, fix-copies
UmerHA Apr 3, 2024
25b7473
Implemented review feedback
UmerHA Apr 3, 2024
6ba84ca
Removed compatibility check for vae/ctrl embedding
UmerHA Apr 3, 2024
4ded3ad
make style, quality, fix-copies
UmerHA Apr 3, 2024
c418160
Delete Pipfile
UmerHA Apr 3, 2024
4965d49
Merge branch 'main' into controlnetxs-2
UmerHA Apr 8, 2024
0de4b44
Integrated review feedback
UmerHA Apr 8, 2024
52e7fa8
Merge branch 'controlnetxs-2' of https://github.com/UmerHA/diffusers …
UmerHA Apr 8, 2024
1d8cad8
Reduced size of test tensors
UmerHA Apr 8, 2024
f334238
Renamed cnxs-`Addon` to cnxs-`Adapter`
UmerHA Apr 9, 2024
a9003b8
Merge branch 'main' into controlnetxs-2
DN6 Apr 11, 2024
7782b58
Fixed save_pretrained/from_pretrained bug
UmerHA Apr 11, 2024
aa294ba
Merge branch 'main' into controlnetxs-2
UmerHA Apr 11, 2024
b5815cc
Removed redundant code
UmerHA Apr 12, 2024
3882989
Merge branch 'main' into controlnetxs-2
DN6 Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/en/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@
title: ControlNet
- local: api/pipelines/controlnet_sdxl
title: ControlNet with Stable Diffusion XL
- local: api/pipelines/controlnetxs
title: ControlNet-XS
- local: api/pipelines/controlnetxs_sdxl
title: ControlNet-XS with Stable Diffusion XL
- local: api/pipelines/dance_diffusion
title: Dance Diffusion
- local: api/pipelines/ddim
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!--Copyright 2023 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->

# ControlNet-XS

ControlNet-XS was introduced in [ControlNet-XS](https://vislearn.github.io/ControlNet-XS/) by Denis Zavadski and Carsten Rother. It is based on the observation that the control model in the [original ControlNet](https://huggingface.co/papers/2302.05543) can be made much smaller and still produce good results.
Expand All @@ -12,5 +24,16 @@ Here's the overview from the [project page](https://vislearn.github.io/ControlNe

This model was contributed by [UmerHA](https://twitter.com/UmerHAdil). ❤️

<Tip>

Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading#reuse-components-across-pipelines) section to learn how to efficiently load the same components into multiple pipelines.

</Tip>

## StableDiffusionControlNetXSPipeline
[[autodoc]] StableDiffusionControlNetXSPipeline
- all
- __call__

> 🧠 Make sure to check out the Schedulers [guide](https://huggingface.co/docs/diffusers/main/en/using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading#reuse-components-across-pipelines) section to learn how to efficiently load the same components into multiple pipelines.
## StableDiffusionPipelineOutput
[[autodoc]] pipelines.stable_diffusion.StableDiffusionPipelineOutput
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!--Copyright 2023 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->

# ControlNet-XS with Stable Diffusion XL

ControlNet-XS was introduced in [ControlNet-XS](https://vislearn.github.io/ControlNet-XS/) by Denis Zavadski and Carsten Rother. It is based on the observation that the control model in the [original ControlNet](https://huggingface.co/papers/2302.05543) can be made much smaller and still produce good results.
Expand All @@ -12,4 +24,22 @@ Here's the overview from the [project page](https://vislearn.github.io/ControlNe

This model was contributed by [UmerHA](https://twitter.com/UmerHAdil). ❤️

> 🧠 Make sure to check out the Schedulers [guide](https://huggingface.co/docs/diffusers/main/en/using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading#reuse-components-across-pipelines) section to learn how to efficiently load the same components into multiple pipelines.
<Tip warning={true}>

🧪 Many of the SDXL ControlNet checkpoints are experimental, and there is a lot of room for improvement. Feel free to open an [Issue](https://github.com/huggingface/diffusers/issues/new/choose) and leave us feedback on how we can improve!

</Tip>

<Tip>

Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading#reuse-components-across-pipelines) section to learn how to efficiently load the same components into multiple pipelines.

</Tip>

## StableDiffusionXLControlNetXSPipeline
[[autodoc]] StableDiffusionXLControlNetXSPipeline
- all
- __call__

## StableDiffusionPipelineOutput
[[autodoc]] pipelines.stable_diffusion.StableDiffusionPipelineOutput
Loading
Loading