Skip to content

Commit 5272791

Browse files
authored
Merge branch 'main' into advdiff_sdxl
2 parents e988c7e + 7635d3d commit 5272791

File tree

88 files changed

+16003
-2603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+16003
-2603
lines changed

.github/workflows/benchmark.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
nvidia-smi
3232
- name: Install dependencies
3333
run: |
34-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
3534
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3635
python -m uv pip install -e [quality,test]
3736
python -m uv pip install pandas peft

.github/workflows/build_docker_images.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020

2121
jobs:
2222
test-build-docker-images:
23-
runs-on: ubuntu-latest
23+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
2424
if: github.event_name == 'pull_request'
2525
steps:
2626
- name: Set up Docker Buildx
@@ -50,7 +50,7 @@ jobs:
5050
if: steps.file_changes.outputs.all != ''
5151

5252
build-and-push-docker-images:
53-
runs-on: ubuntu-latest
53+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
5454
if: github.event_name != 'pull_request'
5555

5656
permissions:
@@ -73,13 +73,13 @@ jobs:
7373
steps:
7474
- name: Checkout repository
7575
uses: actions/checkout@v3
76-
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v1
7778
- name: Login to Docker Hub
7879
uses: docker/login-action@v2
7980
with:
8081
username: ${{ env.REGISTRY }}
8182
password: ${{ secrets.DOCKERHUB_TOKEN }}
82-
8383
- name: Build and push
8484
uses: docker/build-push-action@v3
8585
with:

.github/workflows/nightly_tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ jobs:
7070

7171
- name: Install dependencies
7272
run: |
73-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
7473
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7574
python -m uv pip install -e [quality,test]
7675
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -131,7 +130,6 @@ jobs:
131130

132131
- name: Install dependencies
133132
run: |
134-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
135133
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
136134
python -m uv pip install -e [quality,test]
137135
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -202,7 +200,6 @@ jobs:
202200

203201
- name: Install dependencies
204202
run: |
205-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
206203
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
207204
python -m uv pip install -e [quality,test]
208205
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -262,7 +259,6 @@ jobs:
262259

263260
- name: Install dependencies
264261
run: |
265-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
266262
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
267263
python -m uv pip install -e [quality,test]
268264
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git

.github/workflows/pr_test_fetcher.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
fetch-depth: 0
3333
- name: Install dependencies
3434
run: |
35-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
3635
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3736
python -m uv pip install -e [quality,test]
3837
- name: Environment
@@ -89,7 +88,6 @@ jobs:
8988

9089
- name: Install dependencies
9190
run: |
92-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
9391
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
9492
python -m pip install -e [quality,test]
9593
python -m pip install accelerate
@@ -147,7 +145,6 @@ jobs:
147145

148146
- name: Install dependencies
149147
run: |
150-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
151148
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
152149
python -m pip install -e [quality,test]
153150

.github/workflows/pr_test_peft_backend.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ jobs:
8989

9090
- name: Install dependencies
9191
run: |
92-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
9392
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
9493
python -m uv pip install -e [quality,test]
9594
if [ "${{ matrix.lib-versions }}" == "main" ]; then
96-
python -m uv pip install -U peft@git+https://github.com/huggingface/peft.git
95+
python -m pip install -U peft@git+https://github.com/huggingface/peft.git
9796
python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
9897
python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
9998
else

.github/workflows/pr_tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ jobs:
116116

117117
- name: Install dependencies
118118
run: |
119-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
120119
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
121120
python -m uv pip install -e [quality,test]
122121
python -m uv pip install accelerate
@@ -205,7 +204,6 @@ jobs:
205204

206205
- name: Install dependencies
207206
run: |
208-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
209207
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
210208
python -m uv pip install -e [quality,test]
211209

.github/workflows/push_tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
nvidia-smi
7272
- name: Install dependencies
7373
run: |
74-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
7574
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7675
python -m uv pip install -e [quality,test]
7776
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -121,7 +120,6 @@ jobs:
121120

122121
- name: Install dependencies
123122
run: |
124-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
125123
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
126124
python -m uv pip install -e [quality,test]
127125
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -171,11 +169,10 @@ jobs:
171169

172170
- name: Install dependencies
173171
run: |
174-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
175172
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
176173
python -m uv pip install -e [quality,test]
177174
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
178-
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
175+
python -m pip install -U peft@git+https://github.com/huggingface/peft.git
179176
180177
- name: Environment
181178
run: |
@@ -222,7 +219,6 @@ jobs:
222219

223220
- name: Install dependencies
224221
run: |
225-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
226222
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
227223
python -m uv pip install -e [quality,test]
228224
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -270,7 +266,6 @@ jobs:
270266

271267
- name: Install dependencies
272268
run: |
273-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
274269
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
275270
python -m uv pip install -e [quality,test]
276271
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git

.github/workflows/push_tests_fast.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868

6969
- name: Install dependencies
7070
run: |
71-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
7271
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7372
python -m uv pip install -e [quality,test]
7473

.github/workflows/update_metadata.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update Diffusers metadata
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- update_diffusers_metadata*
9+
10+
jobs:
11+
update_metadata:
12+
runs-on: ubuntu-22.04
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Setup environment
21+
run: |
22+
pip install --upgrade pip
23+
pip install datasets pandas
24+
pip install .[torch]
25+
26+
- name: Update metadata
27+
env:
28+
HUGGING_FACE_HUB_TOKEN: ${{ secrets.SAYAK_HF_TOKEN }}
29+
run: |
30+
python utils/update_metadata.py --commit_sha ${{ github.sha }}

docker/diffusers-flax-cpu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt update && \
1212
curl \
1313
ca-certificates \
1414
libsndfile1-dev \
15+
libgl1 \
1516
python3.8 \
1617
python3-pip \
1718
python3.8-venv && \

docker/diffusers-flax-tpu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt update && \
1212
curl \
1313
ca-certificates \
1414
libsndfile1-dev \
15+
libgl1 \
1516
python3.8 \
1617
python3-pip \
1718
python3.8-venv && \

docker/diffusers-onnxruntime-cpu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt update && \
1212
curl \
1313
ca-certificates \
1414
libsndfile1-dev \
15+
libgl1 \
1516
python3.8 \
1617
python3-pip \
1718
python3.8-venv && \

docker/diffusers-onnxruntime-cuda/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt update && \
1212
curl \
1313
ca-certificates \
1414
libsndfile1-dev \
15+
libgl1 \
1516
python3.8 \
1617
python3-pip \
1718
python3.8-venv && \

docs/source/en/_toctree.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@
2424
title: Tutorials
2525
- sections:
2626
- sections:
27-
- local: using-diffusers/loading_overview
28-
title: Overview
2927
- local: using-diffusers/loading
30-
title: Load pipelines, models, and schedulers
31-
- local: using-diffusers/schedulers
32-
title: Load and compare different schedulers
28+
title: Load pipelines
3329
- local: using-diffusers/custom_pipeline_overview
3430
title: Load community pipelines and components
31+
- local: using-diffusers/schedulers
32+
title: Load schedulers and models
3533
- local: using-diffusers/using_safetensors
3634
title: Load safetensors
3735
- local: using-diffusers/other-formats
@@ -71,7 +69,7 @@
7169
- local: using-diffusers/control_brightness
7270
title: Control image brightness
7371
- local: using-diffusers/weighted_prompts
74-
title: Prompt weighting
72+
title: Prompt techniques
7573
- local: using-diffusers/freeu
7674
title: Improve generation quality with FreeU
7775
title: Techniques
@@ -86,6 +84,8 @@
8684
title: Kandinsky
8785
- local: using-diffusers/controlnet
8886
title: ControlNet
87+
- local: using-diffusers/t2i_adapter
88+
title: T2I-Adapter
8989
- local: using-diffusers/shap-e
9090
title: Shap-E
9191
- local: using-diffusers/diffedit
@@ -170,6 +170,8 @@
170170
title: Token merging
171171
- local: optimization/deepcache
172172
title: DeepCache
173+
- local: optimization/tgate
174+
title: TGATE
173175
title: General optimizations
174176
- sections:
175177
- local: using-diffusers/stable_diffusion_jax_how_to
@@ -280,6 +282,10 @@
280282
title: ControlNet
281283
- local: api/pipelines/controlnet_sdxl
282284
title: ControlNet with Stable Diffusion XL
285+
- local: api/pipelines/controlnetxs
286+
title: ControlNet-XS
287+
- local: api/pipelines/controlnetxs_sdxl
288+
title: ControlNet-XS with Stable Diffusion XL
283289
- local: api/pipelines/dance_diffusion
284290
title: Dance Diffusion
285291
- local: api/pipelines/ddim
@@ -358,7 +364,7 @@
358364
- local: api/pipelines/stable_diffusion/ldm3d_diffusion
359365
title: LDM3D Text-to-(RGB, Depth), Text-to-(RGB-pano, Depth-pano), LDM3D Upscaler
360366
- local: api/pipelines/stable_diffusion/adapter
361-
title: Stable Diffusion T2I-Adapter
367+
title: T2I-Adapter
362368
- local: api/pipelines/stable_diffusion/gligen
363369
title: GLIGEN (Grounded Language-to-Image Generation)
364370
title: Stable Diffusion

examples/research_projects/controlnetxs/README.md renamed to docs/source/en/api/pipelines/controlnetxs.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
113
# ControlNet-XS
214

315
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.
@@ -12,5 +24,16 @@ Here's the overview from the [project page](https://vislearn.github.io/ControlNe
1224

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

27+
<Tip>
28+
29+
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.
30+
31+
</Tip>
32+
33+
## StableDiffusionControlNetXSPipeline
34+
[[autodoc]] StableDiffusionControlNetXSPipeline
35+
- all
36+
- __call__
1537

16-
> 🧠 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.
38+
## StableDiffusionPipelineOutput
39+
[[autodoc]] pipelines.stable_diffusion.StableDiffusionPipelineOutput

examples/research_projects/controlnetxs/README_sdxl.md renamed to docs/source/en/api/pipelines/controlnetxs_sdxl.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
113
# ControlNet-XS with Stable Diffusion XL
214

315
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.
@@ -12,4 +24,22 @@ Here's the overview from the [project page](https://vislearn.github.io/ControlNe
1224

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

15-
> 🧠 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.
27+
<Tip warning={true}>
28+
29+
🧪 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!
30+
31+
</Tip>
32+
33+
<Tip>
34+
35+
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.
36+
37+
</Tip>
38+
39+
## StableDiffusionXLControlNetXSPipeline
40+
[[autodoc]] StableDiffusionXLControlNetXSPipeline
41+
- all
42+
- __call__
43+
44+
## StableDiffusionPipelineOutput
45+
[[autodoc]] pipelines.stable_diffusion.StableDiffusionPipelineOutput

0 commit comments

Comments
 (0)