Skip to content

Commit 9fb0466

Browse files
authored
Merge pull request #3 from huggingface/main
huggingface org 업데이트
2 parents ac3fc64 + a8315ce commit 9fb0466

File tree

542 files changed

+59135
-10186
lines changed

Some content is hidden

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

542 files changed

+59135
-10186
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
contact_links:
22
- name: Blank issue
33
url: https://github.com/huggingface/diffusers/issues/new
4-
about: General usage questions and community discussions
4+
about: Other
5+
- name: Forum
6+
url: https://discuss.huggingface.co/
7+
about: General usage questions and community discussions

.github/workflows/build_documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
with:
1414
commit_sha: ${{ github.sha }}
1515
package: diffusers
16+
notebook_folder: diffusers_doc
1617
languages: en ko
1718
secrets:
1819
token: ${{ secrets.HUGGINGFACE_PUSH }}

.github/workflows/pr_quality.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ jobs:
2727
pip install .[quality]
2828
- name: Check quality
2929
run: |
30-
black --check --preview examples tests src utils scripts
31-
isort --check-only examples tests src utils scripts
32-
flake8 examples tests src utils scripts
30+
black --check examples tests src utils scripts
31+
ruff examples tests src utils scripts
3332
doc-builder style src/diffusers docs/source --max_len 119 --check_only --path_to_docs docs/source
3433
3534
check_repository_consistency:
@@ -48,3 +47,4 @@ jobs:
4847
run: |
4948
python utils/check_copies.py
5049
python utils/check_dummies.py
50+
make deps_table_check_updated

.github/workflows/pr_tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ jobs:
3636
runner: docker-cpu
3737
image: diffusers/diffusers-onnxruntime-cpu
3838
report: onnx_cpu
39+
- name: PyTorch Example CPU tests on Ubuntu
40+
framework: pytorch_examples
41+
runner: docker-cpu
42+
image: diffusers/diffusers-pytorch-cpu
43+
report: torch_cpu
3944

4045
name: ${{ matrix.config.name }}
4146

@@ -90,6 +95,13 @@ jobs:
9095
--make-reports=tests_${{ matrix.config.report }} \
9196
tests/
9297
98+
- name: Run example PyTorch CPU tests
99+
if: ${{ matrix.config.framework == 'pytorch_examples' }}
100+
run: |
101+
python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \
102+
--make-reports=tests_${{ matrix.config.report }} \
103+
examples/test_examples.py
104+
93105
- name: Failure short reports
94106
if: ${{ failure() }}
95107
run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt

.github/workflows/push_tests_fast.yml

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
name: Slow tests on main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
DIFFUSERS_IS_CI: yes
10+
HF_HOME: /mnt/cache
11+
OMP_NUM_THREADS: 8
12+
MKL_NUM_THREADS: 8
13+
PYTEST_TIMEOUT: 600
14+
RUN_SLOW: no
15+
16+
jobs:
17+
run_fast_tests:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- name: Fast PyTorch CPU tests on Ubuntu
23+
framework: pytorch
24+
runner: docker-cpu
25+
image: diffusers/diffusers-pytorch-cpu
26+
report: torch_cpu
27+
- name: Fast Flax CPU tests on Ubuntu
28+
framework: flax
29+
runner: docker-cpu
30+
image: diffusers/diffusers-flax-cpu
31+
report: flax_cpu
32+
- name: Fast ONNXRuntime CPU tests on Ubuntu
33+
framework: onnxruntime
34+
runner: docker-cpu
35+
image: diffusers/diffusers-onnxruntime-cpu
36+
report: onnx_cpu
37+
- name: PyTorch Example CPU tests on Ubuntu
38+
framework: pytorch_examples
39+
runner: docker-cpu
40+
image: diffusers/diffusers-pytorch-cpu
41+
report: torch_cpu
42+
43+
name: ${{ matrix.config.name }}
44+
45+
runs-on: ${{ matrix.config.runner }}
46+
47+
container:
48+
image: ${{ matrix.config.image }}
49+
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
50+
51+
defaults:
52+
run:
53+
shell: bash
54+
55+
steps:
56+
- name: Checkout diffusers
57+
uses: actions/checkout@v3
58+
with:
59+
fetch-depth: 2
60+
61+
- name: Install dependencies
62+
run: |
63+
apt-get update && apt-get install libsndfile1-dev -y
64+
python -m pip install -e .[quality,test]
65+
python -m pip install -U git+https://github.com/huggingface/transformers
66+
python -m pip install git+https://github.com/huggingface/accelerate
67+
68+
- name: Environment
69+
run: |
70+
python utils/print_env.py
71+
72+
- name: Run fast PyTorch CPU tests
73+
if: ${{ matrix.config.framework == 'pytorch' }}
74+
run: |
75+
python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \
76+
-s -v -k "not Flax and not Onnx" \
77+
--make-reports=tests_${{ matrix.config.report }} \
78+
tests/
79+
80+
- name: Run fast Flax TPU tests
81+
if: ${{ matrix.config.framework == 'flax' }}
82+
run: |
83+
python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \
84+
-s -v -k "Flax" \
85+
--make-reports=tests_${{ matrix.config.report }} \
86+
tests/
87+
88+
- name: Run fast ONNXRuntime CPU tests
89+
if: ${{ matrix.config.framework == 'onnxruntime' }}
90+
run: |
91+
python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \
92+
-s -v -k "Onnx" \
93+
--make-reports=tests_${{ matrix.config.report }} \
94+
tests/
95+
96+
- name: Run example PyTorch CPU tests
97+
if: ${{ matrix.config.framework == 'pytorch_examples' }}
98+
run: |
99+
python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \
100+
--make-reports=tests_${{ matrix.config.report }} \
101+
examples/test_examples.py
102+
103+
- name: Failure short reports
104+
if: ${{ failure() }}
105+
run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt
106+
107+
- name: Test suite reports artifacts
108+
if: ${{ always() }}
109+
uses: actions/upload-artifact@v2
110+
with:
111+
name: pr_${{ matrix.config.report }}_test_reports
112+
path: reports
113+
114+
run_fast_tests_apple_m1:
115+
name: Fast PyTorch MPS tests on MacOS
116+
runs-on: [ self-hosted, apple-m1 ]
117+
118+
steps:
119+
- name: Checkout diffusers
120+
uses: actions/checkout@v3
121+
with:
122+
fetch-depth: 2
123+
124+
- name: Clean checkout
125+
shell: arch -arch arm64 bash {0}
126+
run: |
127+
git clean -fxd
128+
129+
- name: Setup miniconda
130+
uses: ./.github/actions/setup-miniconda
131+
with:
132+
python-version: 3.9
133+
134+
- name: Install dependencies
135+
shell: arch -arch arm64 bash {0}
136+
run: |
137+
${CONDA_RUN} python -m pip install --upgrade pip
138+
${CONDA_RUN} python -m pip install -e .[quality,test]
139+
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
140+
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate
141+
${CONDA_RUN} python -m pip install -U git+https://github.com/huggingface/transformers
142+
143+
- name: Environment
144+
shell: arch -arch arm64 bash {0}
145+
run: |
146+
${CONDA_RUN} python utils/print_env.py
147+
148+
- name: Run fast PyTorch tests on M1 (MPS)
149+
shell: arch -arch arm64 bash {0}
150+
env:
151+
HF_HOME: /System/Volumes/Data/mnt/cache
152+
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
153+
run: |
154+
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
155+
156+
- name: Failure short reports
157+
if: ${{ failure() }}
158+
run: cat reports/tests_torch_mps_failures_short.txt
159+
160+
- name: Test suite reports artifacts
161+
if: ${{ always() }}
162+
uses: actions/upload-artifact@v2
163+
with:
164+
name: pr_torch_mps_test_reports
165+
path: reports

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,8 @@ tags
169169

170170
# dependencies
171171
/transformers
172+
173+
# ruff
174+
.ruff_cache
175+
176+
wandb

CITATION.cff

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
cff-version: 1.2.0
2+
title: 'Diffusers: State-of-the-art diffusion models'
3+
message: >-
4+
If you use this software, please cite it using the
5+
metadata from this file.
6+
type: software
7+
authors:
8+
- given-names: Patrick
9+
family-names: von Platen
10+
- given-names: Suraj
11+
family-names: Patil
12+
- given-names: Anton
13+
family-names: Lozhkov
14+
- given-names: Pedro
15+
family-names: Cuenca
16+
- given-names: Nathan
17+
family-names: Lambert
18+
- given-names: Kashif
19+
family-names: Rasul
20+
- given-names: Mishig
21+
family-names: Davaadorj
22+
- given-names: Thomas
23+
family-names: Wolf
24+
repository-code: 'https://github.com/huggingface/diffusers'
25+
abstract: >-
26+
Diffusers provides pretrained diffusion models across
27+
multiple modalities, such as vision and audio, and serves
28+
as a modular toolbox for inference and training of
29+
diffusion models.
30+
keywords:
31+
- deep-learning
32+
- pytorch
33+
- image-generation
34+
- diffusion
35+
- text2image
36+
- image2image
37+
- score-based-generative-modeling
38+
- stable-diffusion
39+
license: Apache-2.0
40+
version: 0.12.1

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ community include:
2424
* Accepting responsibility and apologizing to those affected by our mistakes,
2525
and learning from the experience
2626
* Focusing on what is best not just for us as individuals, but for the
27-
overall community
27+
overall diffusers community
2828

2929
Examples of unacceptable behavior include:
3030

@@ -34,6 +34,7 @@ Examples of unacceptable behavior include:
3434
* Public or private harassment
3535
* Publishing others' private information, such as a physical or email
3636
address, without their explicit permission
37+
* Spamming issues or PRs with links to projects unrelated to this library
3738
* Other conduct which could reasonably be considered inappropriate in a
3839
professional setting
3940

0 commit comments

Comments
 (0)