Skip to content

Commit f4a46cc

Browse files
authored
Merge branch 'main' into refactor-hub-attn-kernels
2 parents cab2249 + 67dc65e commit f4a46cc

File tree

147 files changed

+8944
-1155
lines changed

Some content is hidden

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

147 files changed

+8944
-1155
lines changed

.github/workflows/nightly_tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
CUBLAS_WORKSPACE_CONFIG: :16:8
8585
run: |
8686
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
87-
-s -v -k "not Flax and not Onnx" \
87+
-k "not Flax and not Onnx" \
8888
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
8989
--report-log=tests_pipeline_${{ matrix.module }}_cuda.log \
9090
tests/pipelines/${{ matrix.module }}
@@ -138,7 +138,7 @@ jobs:
138138
CUBLAS_WORKSPACE_CONFIG: :16:8
139139
run: |
140140
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
141-
-s -v -k "not Flax and not Onnx" \
141+
-k "not Flax and not Onnx" \
142142
--make-reports=tests_torch_${{ matrix.module }}_cuda \
143143
--report-log=tests_torch_${{ matrix.module }}_cuda.log \
144144
tests/${{ matrix.module }}
@@ -151,7 +151,7 @@ jobs:
151151
CUBLAS_WORKSPACE_CONFIG: :16:8
152152
run: |
153153
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
154-
-s -v --make-reports=examples_torch_cuda \
154+
--make-reports=examples_torch_cuda \
155155
--report-log=examples_torch_cuda.log \
156156
examples/
157157
@@ -198,7 +198,7 @@ jobs:
198198
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
199199
RUN_COMPILE: yes
200200
run: |
201-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "compile" --make-reports=tests_torch_compile_cuda tests/
201+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "compile" --make-reports=tests_torch_compile_cuda tests/
202202
- name: Failure short reports
203203
if: ${{ failure() }}
204204
run: cat reports/tests_torch_compile_cuda_failures_short.txt
@@ -293,7 +293,7 @@ jobs:
293293
CUBLAS_WORKSPACE_CONFIG: :16:8
294294
run: |
295295
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
296-
-s -v -k "not Flax and not Onnx" \
296+
-k "not Flax and not Onnx" \
297297
--make-reports=tests_torch_minimum_version_cuda \
298298
tests/models/test_modeling_common.py \
299299
tests/pipelines/test_pipelines_common.py \
@@ -531,7 +531,7 @@ jobs:
531531
# HF_HOME: /System/Volumes/Data/mnt/cache
532532
# HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
533533
# run: |
534-
# ${CONDA_RUN} pytest -n 1 -s -v --make-reports=tests_torch_mps \
534+
# ${CONDA_RUN} pytest -n 1 --make-reports=tests_torch_mps \
535535
# --report-log=tests_torch_mps.log \
536536
# tests/
537537
# - name: Failure short reports
@@ -587,7 +587,7 @@ jobs:
587587
# HF_HOME: /System/Volumes/Data/mnt/cache
588588
# HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
589589
# run: |
590-
# ${CONDA_RUN} pytest -n 1 -s -v --make-reports=tests_torch_mps \
590+
# ${CONDA_RUN} pytest -n 1 --make-reports=tests_torch_mps \
591591
# --report-log=tests_torch_mps.log \
592592
# tests/
593593
# - name: Failure short reports

.github/workflows/pr_modular_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
if: ${{ matrix.config.framework == 'pytorch_pipelines' }}
121121
run: |
122122
pytest -n 8 --max-worker-restart=0 --dist=loadfile \
123-
-s -v -k "not Flax and not Onnx" \
123+
-k "not Flax and not Onnx" \
124124
--make-reports=tests_${{ matrix.config.report }} \
125125
tests/modular_pipelines
126126

.github/workflows/pr_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ jobs:
126126
if: ${{ matrix.config.framework == 'pytorch_pipelines' }}
127127
run: |
128128
pytest -n 8 --max-worker-restart=0 --dist=loadfile \
129-
-s -v -k "not Flax and not Onnx" \
129+
-k "not Flax and not Onnx" \
130130
--make-reports=tests_${{ matrix.config.report }} \
131131
tests/pipelines
132132
133133
- name: Run fast PyTorch Model Scheduler CPU tests
134134
if: ${{ matrix.config.framework == 'pytorch_models' }}
135135
run: |
136136
pytest -n 4 --max-worker-restart=0 --dist=loadfile \
137-
-s -v -k "not Flax and not Onnx and not Dependency" \
137+
-k "not Flax and not Onnx and not Dependency" \
138138
--make-reports=tests_${{ matrix.config.report }} \
139139
tests/models tests/schedulers tests/others
140140
@@ -255,11 +255,11 @@ jobs:
255255
- name: Run fast PyTorch LoRA tests with PEFT
256256
run: |
257257
pytest -n 4 --max-worker-restart=0 --dist=loadfile \
258-
-s -v \
258+
\
259259
--make-reports=tests_peft_main \
260260
tests/lora/
261261
pytest -n 4 --max-worker-restart=0 --dist=loadfile \
262-
-s -v \
262+
\
263263
--make-reports=tests_models_lora_peft_main \
264264
tests/models/ -k "lora"
265265

.github/workflows/pr_tests_gpu.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ jobs:
151151
run: |
152152
if [ "${{ matrix.module }}" = "ip_adapters" ]; then
153153
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
154-
-s -v -k "not Flax and not Onnx" \
154+
-k "not Flax and not Onnx" \
155155
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
156156
tests/pipelines/${{ matrix.module }}
157157
else
158158
pattern=$(cat ${{ steps.extract_tests.outputs.pattern_file }})
159159
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
160-
-s -v -k "not Flax and not Onnx and $pattern" \
160+
-k "not Flax and not Onnx and $pattern" \
161161
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
162162
tests/pipelines/${{ matrix.module }}
163163
fi
@@ -222,10 +222,10 @@ jobs:
222222
run: |
223223
pattern=$(cat ${{ steps.extract_tests.outputs.pattern_file }})
224224
if [ -z "$pattern" ]; then
225-
pytest -n 1 -sv --max-worker-restart=0 --dist=loadfile -k "not Flax and not Onnx" tests/${{ matrix.module }} \
225+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "not Flax and not Onnx" tests/${{ matrix.module }} \
226226
--make-reports=tests_torch_cuda_${{ matrix.module }}
227227
else
228-
pytest -n 1 -sv --max-worker-restart=0 --dist=loadfile -k "not Flax and not Onnx and $pattern" tests/${{ matrix.module }} \
228+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "not Flax and not Onnx and $pattern" tests/${{ matrix.module }} \
229229
--make-reports=tests_torch_cuda_${{ matrix.module }}
230230
fi
231231
@@ -274,7 +274,7 @@ jobs:
274274
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
275275
run: |
276276
uv pip install ".[training]"
277-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v --make-reports=examples_torch_cuda examples/
277+
pytest -n 1 --max-worker-restart=0 --dist=loadfile --make-reports=examples_torch_cuda examples/
278278
279279
- name: Failure short reports
280280
if: ${{ failure() }}

.github/workflows/push_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
CUBLAS_WORKSPACE_CONFIG: :16:8
8888
run: |
8989
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
90-
-s -v -k "not Flax and not Onnx" \
90+
-k "not Flax and not Onnx" \
9191
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
9292
tests/pipelines/${{ matrix.module }}
9393
- name: Failure short reports
@@ -141,7 +141,7 @@ jobs:
141141
CUBLAS_WORKSPACE_CONFIG: :16:8
142142
run: |
143143
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
144-
-s -v -k "not Flax and not Onnx" \
144+
-k "not Flax and not Onnx" \
145145
--make-reports=tests_torch_cuda_${{ matrix.module }} \
146146
tests/${{ matrix.module }}
147147
@@ -189,7 +189,7 @@ jobs:
189189
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
190190
RUN_COMPILE: yes
191191
run: |
192-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "compile" --make-reports=tests_torch_compile_cuda tests/
192+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "compile" --make-reports=tests_torch_compile_cuda tests/
193193
- name: Failure short reports
194194
if: ${{ failure() }}
195195
run: cat reports/tests_torch_compile_cuda_failures_short.txt
@@ -230,7 +230,7 @@ jobs:
230230
env:
231231
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
232232
run: |
233-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
233+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
234234
- name: Failure short reports
235235
if: ${{ failure() }}
236236
run: cat reports/tests_torch_xformers_cuda_failures_short.txt
@@ -273,7 +273,7 @@ jobs:
273273
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
274274
run: |
275275
uv pip install ".[training]"
276-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v --make-reports=examples_torch_cuda examples/
276+
pytest -n 1 --max-worker-restart=0 --dist=loadfile --make-reports=examples_torch_cuda examples/
277277
278278
- name: Failure short reports
279279
if: ${{ failure() }}

.github/workflows/push_tests_fast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: ${{ matrix.config.framework == 'pytorch' }}
7171
run: |
7272
pytest -n 4 --max-worker-restart=0 --dist=loadfile \
73-
-s -v -k "not Flax and not Onnx" \
73+
-k "not Flax and not Onnx" \
7474
--make-reports=tests_${{ matrix.config.report }} \
7575
tests/
7676

.github/workflows/push_tests_mps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
HF_HOME: /System/Volumes/Data/mnt/cache
5858
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5959
run: |
60-
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
60+
${CONDA_RUN} python -m pytest -n 0 --make-reports=tests_torch_mps tests/
6161
6262
- name: Failure short reports
6363
if: ${{ failure() }}

.github/workflows/release_tests_fast.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
CUBLAS_WORKSPACE_CONFIG: :16:8
8585
run: |
8686
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
87-
-s -v -k "not Flax and not Onnx" \
87+
-k "not Flax and not Onnx" \
8888
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
8989
tests/pipelines/${{ matrix.module }}
9090
- name: Failure short reports
@@ -137,7 +137,7 @@ jobs:
137137
CUBLAS_WORKSPACE_CONFIG: :16:8
138138
run: |
139139
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
140-
-s -v -k "not Flax and not Onnx" \
140+
-k "not Flax and not Onnx" \
141141
--make-reports=tests_torch_${{ matrix.module }}_cuda \
142142
tests/${{ matrix.module }}
143143
@@ -187,7 +187,7 @@ jobs:
187187
CUBLAS_WORKSPACE_CONFIG: :16:8
188188
run: |
189189
pytest -n 1 --max-worker-restart=0 --dist=loadfile \
190-
-s -v -k "not Flax and not Onnx" \
190+
-k "not Flax and not Onnx" \
191191
--make-reports=tests_torch_minimum_cuda \
192192
tests/models/test_modeling_common.py \
193193
tests/pipelines/test_pipelines_common.py \
@@ -240,7 +240,7 @@ jobs:
240240
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
241241
RUN_COMPILE: yes
242242
run: |
243-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "compile" --make-reports=tests_torch_compile_cuda tests/
243+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "compile" --make-reports=tests_torch_compile_cuda tests/
244244
- name: Failure short reports
245245
if: ${{ failure() }}
246246
run: cat reports/tests_torch_compile_cuda_failures_short.txt
@@ -281,7 +281,7 @@ jobs:
281281
env:
282282
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
283283
run: |
284-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
284+
pytest -n 1 --max-worker-restart=0 --dist=loadfile -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
285285
- name: Failure short reports
286286
if: ${{ failure() }}
287287
run: cat reports/tests_torch_xformers_cuda_failures_short.txt
@@ -326,7 +326,7 @@ jobs:
326326
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
327327
run: |
328328
uv pip install ".[training]"
329-
pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v --make-reports=examples_torch_cuda examples/
329+
pytest -n 1 --max-worker-restart=0 --dist=loadfile --make-reports=examples_torch_cuda examples/
330330
331331
- name: Failure short reports
332332
if: ${{ failure() }}

docs/source/en/_toctree.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
title: Reproducibility
2323
- local: using-diffusers/schedulers
2424
title: Schedulers
25+
- local: using-diffusers/automodel
26+
title: AutoModel
2527
- local: using-diffusers/other-formats
2628
title: Model formats
2729
- local: using-diffusers/push_to_hub
@@ -119,6 +121,8 @@
119121
title: ComponentsManager
120122
- local: modular_diffusers/guiders
121123
title: Guiders
124+
- local: modular_diffusers/custom_blocks
125+
title: Building Custom Blocks
122126
title: Modular Diffusers
123127
- isExpanded: false
124128
sections:
@@ -387,6 +391,8 @@
387391
title: Transformer2DModel
388392
- local: api/models/transformer_temporal
389393
title: TransformerTemporalModel
394+
- local: api/models/wan_animate_transformer_3d
395+
title: WanAnimateTransformer3DModel
390396
- local: api/models/wan_transformer_3d
391397
title: WanTransformer3DModel
392398
title: Transformers
@@ -448,6 +454,8 @@
448454
- sections:
449455
- local: api/pipelines/overview
450456
title: Overview
457+
- local: api/pipelines/auto_pipeline
458+
title: AutoPipeline
451459
- sections:
452460
- local: api/pipelines/audioldm
453461
title: AudioLDM
@@ -460,8 +468,6 @@
460468
- local: api/pipelines/stable_audio
461469
title: Stable Audio
462470
title: Audio
463-
- local: api/pipelines/auto_pipeline
464-
title: AutoPipeline
465471
- sections:
466472
- local: api/pipelines/amused
467473
title: aMUSEd
@@ -525,6 +531,8 @@
525531
title: HiDream-I1
526532
- local: api/pipelines/hunyuandit
527533
title: Hunyuan-DiT
534+
- local: api/pipelines/hunyuanimage21
535+
title: HunyuanImage2.1
528536
- local: api/pipelines/pix2pix
529537
title: InstructPix2Pix
530538
- local: api/pipelines/kandinsky
@@ -638,8 +646,6 @@
638646
title: ConsisID
639647
- local: api/pipelines/framepack
640648
title: Framepack
641-
- local: api/pipelines/hunyuanimage21
642-
title: HunyuanImage2.1
643649
- local: api/pipelines/hunyuan_video
644650
title: HunyuanVideo
645651
- local: api/pipelines/i2vgenxl

docs/source/en/api/models/auto_model.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ specific language governing permissions and limitations under the License.
1212

1313
# AutoModel
1414

15-
The `AutoModel` is designed to make it easy to load a checkpoint without needing to know the specific model class. `AutoModel` automatically retrieves the correct model class from the checkpoint `config.json` file.
16-
17-
```python
18-
from diffusers import AutoModel, AutoPipelineForText2Image
19-
20-
unet = AutoModel.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", subfolder="unet")
21-
pipe = AutoPipelineForText2Image.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", unet=unet)
22-
```
23-
15+
[`AutoModel`] automatically retrieves the correct model class from the checkpoint `config.json` file.
2416

2517
## AutoModel
2618

0 commit comments

Comments
 (0)