Skip to content

Commit 256d77e

Browse files
authored
Merge branch 'main' into resadapter
2 parents d68adac + 8690e8b commit 256d77e

File tree

805 files changed

+84610
-18245
lines changed

Some content is hidden

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

805 files changed

+84610
-18245
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,50 +57,54 @@ body:
5757
description: |
5858
Your issue will be replied to more quickly if you can figure out the right person to tag with @.
5959
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
60-
60+
6161
All issues are read by one of the core maintainers, so if you don't know who to tag, just leave this blank and
6262
a core maintainer will ping the right person.
63-
63+
6464
Please tag a maximum of 2 people.
6565
66-
Questions on DiffusionPipeline (Saving, Loading, From pretrained, ...):
66+
Questions on DiffusionPipeline (Saving, Loading, From pretrained, ...): @sayakpaul @DN6
6767
6868
Questions on pipelines:
69-
- Stable Diffusion @yiyixuxu @DN6 @sayakpaul
70-
- Stable Diffusion XL @yiyixuxu @sayakpaul @DN6
71-
- Kandinsky @yiyixuxu
72-
- ControlNet @sayakpaul @yiyixuxu @DN6
73-
- T2I Adapter @sayakpaul @yiyixuxu @DN6
74-
- IF @DN6
75-
- Text-to-Video / Video-to-Video @DN6 @sayakpaul
76-
- Wuerstchen @DN6
69+
- Stable Diffusion @yiyixuxu @asomoza
70+
- Stable Diffusion XL @yiyixuxu @sayakpaul @DN6
71+
- Stable Diffusion 3: @yiyixuxu @sayakpaul @DN6 @asomoza
72+
- Kandinsky @yiyixuxu
73+
- ControlNet @sayakpaul @yiyixuxu @DN6
74+
- T2I Adapter @sayakpaul @yiyixuxu @DN6
75+
- IF @DN6
76+
- Text-to-Video / Video-to-Video @DN6 @sayakpaul
77+
- Wuerstchen @DN6
7778
- Other: @yiyixuxu @DN6
79+
- Improving generation quality: @asomoza
7880
7981
Questions on models:
80-
- UNet @DN6 @yiyixuxu @sayakpaul
81-
- VAE @sayakpaul @DN6 @yiyixuxu
82-
- Transformers/Attention @DN6 @yiyixuxu @sayakpaul @DN6
82+
- UNet @DN6 @yiyixuxu @sayakpaul
83+
- VAE @sayakpaul @DN6 @yiyixuxu
84+
- Transformers/Attention @DN6 @yiyixuxu @sayakpaul
85+
86+
Questions on single file checkpoints: @DN6
8387
84-
Questions on Schedulers: @yiyixuxu
88+
Questions on Schedulers: @yiyixuxu
8589
86-
Questions on LoRA: @sayakpaul
90+
Questions on LoRA: @sayakpaul
8791
88-
Questions on Textual Inversion: @sayakpaul
92+
Questions on Textual Inversion: @sayakpaul
8993
90-
Questions on Training:
91-
- DreamBooth @sayakpaul
92-
- Text-to-Image Fine-tuning @sayakpaul
93-
- Textual Inversion @sayakpaul
94-
- ControlNet @sayakpaul
94+
Questions on Training:
95+
- DreamBooth @sayakpaul
96+
- Text-to-Image Fine-tuning @sayakpaul
97+
- Textual Inversion @sayakpaul
98+
- ControlNet @sayakpaul
9599
96-
Questions on Tests: @DN6 @sayakpaul @yiyixuxu
100+
Questions on Tests: @DN6 @sayakpaul @yiyixuxu
97101
98102
Questions on Documentation: @stevhliu
99103
100104
Questions on JAX- and MPS-related things: @pcuenca
101105
102-
Questions on audio pipelines: @DN6
103-
106+
Questions on audio pipelines: @sanchit-gandhi
107+
108+
104109
105-
106110
placeholder: "@Username ..."

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ members/contributors who may be interested in your PR.
3838
3939
Core library:
4040
41-
- Schedulers: @yiyixuxu
42-
- Pipelines: @sayakpaul @yiyixuxu @DN6
43-
- Training examples: @sayakpaul
41+
- Schedulers: @yiyixuxu
42+
- Pipelines and pipeline callbacks: @yiyixuxu and @asomoza
43+
- Training examples: @sayakpaul
4444
- Docs: @stevhliu and @sayakpaul
4545
- JAX and MPS: @pcuenca
4646
- Audio: @sanchit-gandhi
4747
- General functionalities: @sayakpaul @yiyixuxu @DN6
4848
4949
Integrations:
5050
51-
- deepspeed: HF Trainer/Accelerate: @pacman100
51+
- deepspeed: HF Trainer/Accelerate: @SunMarc
5252
5353
HF projects:
5454

.github/workflows/benchmark.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ env:
1313

1414
jobs:
1515
torch_pipelines_cuda_benchmark_tests:
16+
env:
17+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_BENCHMARK }}
1618
name: Torch Core Pipelines CUDA Benchmarking Tests
1719
strategy:
1820
fail-fast: false
1921
max-parallel: 1
2022
runs-on: [single-gpu, nvidia-gpu, a10, ci]
2123
container:
22-
image: diffusers/diffusers-pytorch-cuda
23-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
24+
image: diffusers/diffusers-pytorch-compile-cuda
25+
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
2426
steps:
2527
- name: Checkout diffusers
2628
uses: actions/checkout@v3
@@ -31,7 +33,6 @@ jobs:
3133
nvidia-smi
3234
- name: Install dependencies
3335
run: |
34-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
3536
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3637
python -m uv pip install -e [quality,test]
3738
python -m uv pip install pandas peft
@@ -40,7 +41,7 @@ jobs:
4041
python utils/print_env.py
4142
- name: Diffusers Benchmarking
4243
env:
43-
HUGGING_FACE_HUB_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }}
44+
HF_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }}
4445
BASE_PATH: benchmark_outputs
4546
run: |
4647
export TOTAL_GPU_MEMORY=$(python -c "import torch; print(torch.cuda.get_device_properties(0).total_memory / (1024**3))")
@@ -51,4 +52,14 @@ jobs:
5152
uses: actions/upload-artifact@v2
5253
with:
5354
name: benchmark_test_reports
54-
path: benchmarks/benchmark_outputs
55+
path: benchmarks/benchmark_outputs
56+
57+
- name: Report success status
58+
if: ${{ success() }}
59+
run: |
60+
pip install requests && python utils/notify_benchmarking_status.py --status=success
61+
62+
- name: Report failure status
63+
if: ${{ failure() }}
64+
run: |
65+
pip install requests && python utils/notify_benchmarking_status.py --status=failure

.github/workflows/build_docker_images.yml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ 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
2727
uses: docker/setup-buildx-action@v1
28-
28+
2929
- name: Check out code
3030
uses: actions/checkout@v3
31-
31+
3232
- name: Find Changed Dockerfiles
3333
id: file_changes
3434
uses: jitterbit/get-changed-files@v1
3535
with:
3636
format: 'space-delimited'
3737
token: ${{ secrets.GITHUB_TOKEN }}
38-
38+
3939
- name: Build Changed Docker Images
4040
run: |
4141
CHANGED_FILES="${{ steps.file_changes.outputs.all }}"
@@ -50,9 +50,9 @@ 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'
55-
55+
5656
permissions:
5757
contents: read
5858
packages: write
@@ -69,17 +69,18 @@ jobs:
6969
- diffusers-flax-tpu
7070
- diffusers-onnxruntime-cpu
7171
- diffusers-onnxruntime-cuda
72+
- diffusers-doc-builder
7273

7374
steps:
7475
- name: Checkout repository
7576
uses: actions/checkout@v3
76-
77+
- name: Set up Docker Buildx
78+
uses: docker/setup-buildx-action@v1
7779
- name: Login to Docker Hub
7880
uses: docker/login-action@v2
7981
with:
8082
username: ${{ env.REGISTRY }}
8183
password: ${{ secrets.DOCKERHUB_TOKEN }}
82-
8384
- name: Build and push
8485
uses: docker/build-push-action@v3
8586
with:
@@ -90,24 +91,11 @@ jobs:
9091

9192
- name: Post to a Slack channel
9293
id: slack
93-
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001
94+
uses: huggingface/hf-workflows/.github/actions/post-slack@main
9495
with:
9596
# Slack channel id, channel name, or user id to post message.
9697
# See also: https://api.slack.com/methods/chat.postMessage#channels
97-
channel-id: ${{ env.CI_SLACK_CHANNEL }}
98-
# For posting a rich message using Block Kit
99-
payload: |
100-
{
101-
"text": "${{ matrix.image-name }} Docker Image build result: ${{ job.status }}\n${{ github.event.head_commit.url }}",
102-
"blocks": [
103-
{
104-
"type": "section",
105-
"text": {
106-
"type": "mrkdwn",
107-
"text": "${{ matrix.image-name }} Docker Image build result: ${{ job.status }}\n${{ github.event.head_commit.url }}"
108-
}
109-
}
110-
]
111-
}
112-
env:
113-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
98+
slack_channel: ${{ env.CI_SLACK_CHANNEL }}
99+
title: "🤗 Results of the ${{ matrix.image-name }} Docker Image build"
100+
status: ${{ job.status }}
101+
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}

.github/workflows/build_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
package: diffusers
2222
notebook_folder: diffusers_doc
2323
languages: en ko zh ja pt
24-
24+
custom_container: diffusers/diffusers-doc-builder
2525
secrets:
2626
token: ${{ secrets.HUGGINGFACE_PUSH }}
2727
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}

.github/workflows/build_pr_documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ jobs:
2020
install_libgl1: true
2121
package: diffusers
2222
languages: en ko zh ja pt
23+
custom_container: diffusers/diffusers-doc-builder
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Mirror Community Pipeline
2+
3+
on:
4+
# Push changes on the main branch
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- 'examples/community/**.py'
10+
11+
# And on tag creation (e.g. `v0.28.1`)
12+
tags:
13+
- '*'
14+
15+
# Manual trigger with ref input
16+
workflow_dispatch:
17+
inputs:
18+
ref:
19+
description: "Either 'main' or a tag ref"
20+
required: true
21+
default: 'main'
22+
23+
jobs:
24+
mirror_community_pipeline:
25+
env:
26+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_COMMUNITY_MIRROR }}
27+
28+
runs-on: ubuntu-latest
29+
steps:
30+
# Checkout to correct ref
31+
# If workflow dispatch
32+
# If ref is 'main', set:
33+
# CHECKOUT_REF=refs/heads/main
34+
# PATH_IN_REPO=main
35+
# Else it must be a tag. Set:
36+
# CHECKOUT_REF=refs/tags/{tag}
37+
# PATH_IN_REPO={tag}
38+
# If not workflow dispatch
39+
# If ref is 'refs/heads/main' => set 'main'
40+
# Else it must be a tag => set {tag}
41+
- name: Set checkout_ref and path_in_repo
42+
run: |
43+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
44+
if [ -z "${{ github.event.inputs.ref }}" ]; then
45+
echo "Error: Missing ref input"
46+
exit 1
47+
elif [ "${{ github.event.inputs.ref }}" == "main" ]; then
48+
echo "CHECKOUT_REF=refs/heads/main" >> $GITHUB_ENV
49+
echo "PATH_IN_REPO=main" >> $GITHUB_ENV
50+
else
51+
echo "CHECKOUT_REF=refs/tags/${{ github.event.inputs.ref }}" >> $GITHUB_ENV
52+
echo "PATH_IN_REPO=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
53+
fi
54+
elif [ "${{ github.ref }}" == "refs/heads/main" ]; then
55+
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
56+
echo "PATH_IN_REPO=main" >> $GITHUB_ENV
57+
else
58+
# e.g. refs/tags/v0.28.1 -> v0.28.1
59+
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
60+
echo "PATH_IN_REPO=$(echo ${{ github.ref }} | sed 's/^refs\/tags\///')" >> $GITHUB_ENV
61+
fi
62+
- name: Print env vars
63+
run: |
64+
echo "CHECKOUT_REF: ${{ env.CHECKOUT_REF }}"
65+
echo "PATH_IN_REPO: ${{ env.PATH_IN_REPO }}"
66+
- uses: actions/checkout@v3
67+
with:
68+
ref: ${{ env.CHECKOUT_REF }}
69+
70+
# Setup + install dependencies
71+
- name: Set up Python
72+
uses: actions/setup-python@v4
73+
with:
74+
python-version: "3.10"
75+
- name: Install dependencies
76+
run: |
77+
python -m pip install --upgrade pip
78+
pip install --upgrade huggingface_hub
79+
80+
# Check secret is set
81+
- name: whoami
82+
run: huggingface-cli whoami
83+
env:
84+
HF_TOKEN: ${{ secrets.HF_TOKEN_MIRROR_COMMUNITY_PIPELINES }}
85+
86+
# Push to HF! (under subfolder based on checkout ref)
87+
# https://huggingface.co/datasets/diffusers/community-pipelines-mirror
88+
- name: Mirror community pipeline to HF
89+
run: huggingface-cli upload diffusers/community-pipelines-mirror ./examples/community ${PATH_IN_REPO} --repo-type dataset
90+
env:
91+
PATH_IN_REPO: ${{ env.PATH_IN_REPO }}
92+
HF_TOKEN: ${{ secrets.HF_TOKEN_MIRROR_COMMUNITY_PIPELINES }}
93+
94+
- name: Report success status
95+
if: ${{ success() }}
96+
run: |
97+
pip install requests && python utils/notify_community_pipelines_mirror.py --status=success
98+
99+
- name: Report failure status
100+
if: ${{ failure() }}
101+
run: |
102+
pip install requests && python utils/notify_community_pipelines_mirror.py --status=failure

0 commit comments

Comments
 (0)