Skip to content

Commit 3b37488

Browse files
tolgacangozstevhliu
andauthoredNov 14, 2023
Fix typos, improve, update at main-page files and .github files (huggingface#5588)
* Update keywords; remove version cuz it changes constantly? * Update if necessary * Fix typos and links * version_range_max from PyTorch's setup.py; fix typos; 1 checklist is enough? * Fix a typo * Fix typos * There is already a Blank issue link at the bottom of the page; direct to Diffusers' forum * Add 🌐 Translating a New Language? page * Update .github/ISSUE_TEMPLATE/translate.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update PHILOSOPHY.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update PHILOSOPHY.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update PHILOSOPHY.md * Update PHILOSOPHY.md * Update CONTRIBUTING.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update CONTRIBUTING.md * Update CONTRIBUTING.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update PHILOSOPHY.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update PHILOSOPHY.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update README.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Add X account link * Update setup.py * Update CITATION.cff --------- Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
1 parent c7260ce commit 3b37488

16 files changed

+182
-116
lines changed
 

‎.github/ISSUE_TEMPLATE/bug-report.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "\U0001F41B Bug Report"
2-
description: Report a bug on diffusers
2+
description: Report a bug on Diffusers
33
labels: [ "bug" ]
44
body:
55
- type: markdown
@@ -10,7 +10,7 @@ body:
1010
Thus, issues are of the same importance as pull requests when contributing to this library ❤️.
1111
In order to make your issue as **useful for the community as possible**, let's try to stick to some simple guidelines:
1212
- 1. Please try to be as precise and concise as possible.
13-
*Give your issue a fitting title. Assume that someone which very limited knowledge of diffusers can understand your issue. Add links to the source code, documentation other issues, pull requests etc...*
13+
*Give your issue a fitting title. Assume that someone which very limited knowledge of Diffusers can understand your issue. Add links to the source code, documentation other issues, pull requests etc...*
1414
- 2. If your issue is about something not working, **always** provide a reproducible code snippet. The reader should be able to reproduce your issue by **only copy-pasting your code snippet into a Python shell**.
1515
*The community cannot solve your issue if it cannot reproduce it. If your bug is related to training, add your training script and make everything needed to train public. Otherwise, just add a simple Python code snippet.*
1616
- 3. Add the **minimum** amount of code / context that is needed to understand, reproduce your issue.
@@ -19,7 +19,7 @@ body:
1919
- type: markdown
2020
attributes:
2121
value: |
22-
For more in-detail information on how to write good issues you can have a look [here](https://huggingface.co/course/chapter8/5?fw=pt)
22+
For more in-detail information on how to write good issues you can have a look [here](https://huggingface.co/course/chapter8/5?fw=pt).
2323
- type: textarea
2424
id: bug-description
2525
attributes:
@@ -47,15 +47,15 @@ body:
4747
attributes:
4848
label: System Info
4949
description: Please share your system info with us. You can run the command `diffusers-cli env` and copy-paste its output below.
50-
placeholder: diffusers version, platform, python version, ...
50+
placeholder: Diffusers version, platform, Python version, ...
5151
validations:
5252
required: true
5353
- type: textarea
5454
id: who-can-help
5555
attributes:
5656
label: Who can help?
5757
description: |
58-
Your issue will be replied to more quickly if you can figure out the right person to tag with @
58+
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**.
6060
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
@@ -66,7 +66,7 @@ body:
6666
Questions on DiffusionPipeline (Saving, Loading, From pretrained, ...):
6767
6868
Questions on pipelines:
69-
- Stable Diffusion @yiyixuxu @DN6 @patrickvonplaten @sayakpaul @patrickvonplaten
69+
- Stable Diffusion @yiyixuxu @DN6 @sayakpaul @patrickvonplaten
7070
- Stable Diffusion XL @yiyixuxu @sayakpaul @DN6 @patrickvonplaten
7171
- Kandinsky @yiyixuxu @patrickvonplaten
7272
- ControlNet @sayakpaul @yiyixuxu @DN6 @patrickvonplaten

‎.github/ISSUE_TEMPLATE/config.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
contact_links:
2-
- name: Blank issue
3-
url: https://github.com/huggingface/diffusers/issues/new
4-
about: Other
52
- name: Forum
6-
url: https://discuss.huggingface.co/
7-
about: General usage questions and community discussions
3+
url: https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63
4+
about: General usage questions and community discussions
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: "\U0001F680 Feature request"
2+
name: "\U0001F680 Feature Request"
33
about: Suggest an idea for this project
44
title: ''
55
labels: ''
@@ -8,13 +8,13 @@ assignees: ''
88
---
99

1010
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...].
1212

13-
**Describe the solution you'd like**
13+
**Describe the solution you'd like.**
1414
A clear and concise description of what you want to happen.
1515

16-
**Describe alternatives you've considered**
16+
**Describe alternatives you've considered.**
1717
A clear and concise description of any alternative solutions or features you've considered.
1818

19-
**Additional context**
19+
**Additional context.**
2020
Add any other context or screenshots about the feature request here.

‎.github/ISSUE_TEMPLATE/new-model-addition.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: "\U0001F31F New model/pipeline/scheduler addition"
2-
description: Submit a proposal/request to implement a new diffusion model / pipeline / scheduler
1+
name: "\U0001F31F New Model/Pipeline/Scheduler Addition"
2+
description: Submit a proposal/request to implement a new diffusion model/pipeline/scheduler
33
labels: [ "New model/pipeline/scheduler" ]
44

55
body:
@@ -19,7 +19,7 @@ body:
1919
description: |
2020
Please note that if the model implementation isn't available or if the weights aren't open-source, we are less likely to implement it in `diffusers`.
2121
options:
22-
- label: "The model implementation is available"
22+
- label: "The model implementation is available."
2323
- label: "The model weights are available (Only relevant if addition is not a scheduler)."
2424

2525
- type: textarea

‎.github/ISSUE_TEMPLATE/translate.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: 🌐 Translating a New Language?
3+
about: Start a new translation effort in your language
4+
title: '[<languageCode>] Translating docs to <languageName>'
5+
labels: WIP
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Note: Please search to see if an issue already exists for the language you are trying to translate.
12+
-->
13+
14+
Hi!
15+
16+
Let's bring the documentation to all the <languageName>-speaking community 🌐.
17+
18+
Who would want to translate? Please follow the 🤗 [TRANSLATING guide](https://github.com/huggingface/diffusers/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.
19+
20+
Some notes:
21+
22+
* Please translate using an informal tone (imagine you are talking with a friend about Diffusers 🤗).
23+
* Please translate in a gender-neutral way.
24+
* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/diffusers/tree/main/docs/source).
25+
* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/diffusers/blob/main/docs/source/en/_toctree.yml).
26+
* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @stevhliu for review.
27+
* 🙋 If you'd like others to help you with the translation, you can also post in the 🤗 [forums](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63).
28+
29+
Thank you so much for your help! 🤗

‎.github/PULL_REQUEST_TEMPLATE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Fixes # (issue)
1919
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
2020
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/diffusers/blob/main/CONTRIBUTING.md)?
2121
- [ ] Did you read our [philosophy doc](https://github.com/huggingface/diffusers/blob/main/PHILOSOPHY.md) (important for complex PRs)?
22-
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case.
22+
- [ ] Was this discussed/approved via a GitHub issue or the [forum](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63)? Please add a link to it if that's the case.
2323
- [ ] Did you make sure to update the documentation with your changes? Here are the
2424
[documentation guidelines](https://github.com/huggingface/diffusers/tree/main/docs), and
25-
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
25+
[here are tips on formatting docstrings](https://github.com/huggingface/diffusers/tree/main/docs#writing-source-documentation).
2626
- [ ] Did you write any new necessary tests?
2727

2828

@@ -31,7 +31,7 @@ Fixes # (issue)
3131
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
3232
members/contributors who may be interested in your PR.
3333

34-
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
34+
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @.
3535
3636
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
3737
Please tag fewer than 3 people.

‎.github/actions/setup-miniconda/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Sets up miniconda in your ${RUNNER_TEMP} environment and gives you
44

55
inputs:
66
python-version:
7-
description: If set to any value, dont use sudo to clean the workspace
7+
description: If set to any value, don't use sudo to clean the workspace
88
required: false
99
type: string
1010
default: "3.9"

‎.gitignore

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Initially taken from Github's Python gitignore file
1+
# Initially taken from GitHub's Python gitignore file
22

33
# Byte-compiled / optimized / DLL files
44
__pycache__/
@@ -34,7 +34,7 @@ wheels/
3434
MANIFEST
3535

3636
# PyInstaller
37-
# Usually these files are written by a python script from a template
37+
# Usually these files are written by a Python script from a template
3838
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3939
*.manifest
4040
*.spec
@@ -153,7 +153,7 @@ debug.env
153153
# vim
154154
.*.swp
155155

156-
#ctags
156+
# ctags
157157
tags
158158

159159
# pre-commit
@@ -164,6 +164,7 @@ tags
164164

165165
# DS_Store (MacOS)
166166
.DS_Store
167+
167168
# RL pipelines may produce mp4 outputs
168169
*.mp4
169170

@@ -173,4 +174,5 @@ tags
173174
# ruff
174175
.ruff_cache
175176

176-
wandb
177+
# wandb
178+
wandb

‎CITATION.cff

+2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ keywords:
3131
- deep-learning
3232
- pytorch
3333
- image-generation
34+
- hacktoberfest
3435
- diffusion
3536
- text2image
3637
- image2image
3738
- score-based-generative-modeling
3839
- stable-diffusion
40+
- stable-diffusion-diffusers
3941
license: Apache-2.0
4042
version: 0.12.1

‎CODE_OF_CONDUCT.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ We as members, contributors, and leaders pledge to make participation in our
77
community a harassment-free experience for everyone, regardless of age, body
88
size, visible or invisible disability, ethnicity, sex characteristics, gender
99
identity and expression, level of experience, education, socio-economic status,
10-
nationality, personal appearance, race, religion, or sexual identity
10+
nationality, personal appearance, race, caste, color, religion, or sexual identity
1111
and orientation.
1212

1313
We pledge to act and interact in ways that contribute to an open, welcoming,
@@ -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 diffusers community
27+
overall Diffusers community
2828

2929
Examples of unacceptable behavior include:
3030

@@ -117,8 +117,8 @@ the community.
117117
## Attribution
118118

119119
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
120-
version 2.0, available at
121-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
version 2.1, available at
121+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
122122

123123
Community Impact Guidelines were inspired by [Mozilla's code of conduct
124124
enforcement ladder](https://github.com/mozilla/diversity).

‎CONTRIBUTING.md

+29-29
Large diffs are not rendered by default.

‎PHILOSOPHY.md

+16-16
Large diffs are not rendered by default.

‎README.md

+29-10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
<!---
2+
Copyright 2022 - The HuggingFace Team. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
117
<p align="center">
218
<br>
319
<img src="https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/en/imgs/diffusers_library.jpg" width="400"/>
@@ -14,7 +30,10 @@
1430
<img alt="GitHub release" src="https://static.pepy.tech/badge/diffusers/month">
1531
</a>
1632
<a href="CODE_OF_CONDUCT.md">
17-
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg">
33+
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg">
34+
</a>
35+
<a href="https://twitter.com/diffuserslib">
36+
<img alt="X account" src="https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40diffuserslib">
1837
</a>
1938
</p>
2039

@@ -24,7 +43,7 @@
2443

2544
- State-of-the-art [diffusion pipelines](https://huggingface.co/docs/diffusers/api/pipelines/overview) that can be run in inference with just a few lines of code.
2645
- Interchangeable noise [schedulers](https://huggingface.co/docs/diffusers/api/schedulers/overview) for different diffusion speeds and output quality.
27-
- Pretrained [models](https://huggingface.co/docs/diffusers/api/models) that can be used as building blocks, and combined with schedulers, for creating your own end-to-end diffusion systems.
46+
- Pretrained [models](https://huggingface.co/docs/diffusers/api/models/overview) that can be used as building blocks, and combined with schedulers, for creating your own end-to-end diffusion systems.
2847

2948
## Installation
3049

@@ -58,7 +77,7 @@ Please refer to the [How to use Stable Diffusion in Apple Silicon](https://huggi
5877

5978
## Quickstart
6079

61-
Generating outputs is super easy with 🤗 Diffusers. To generate an image from text, use the `from_pretrained` method to load any pretrained diffusion model (browse the [Hub](https://huggingface.co/models?library=diffusers&sort=downloads) for 4000+ checkpoints):
80+
Generating outputs is super easy with 🤗 Diffusers. To generate an image from text, use the `from_pretrained` method to load any pretrained diffusion model (browse the [Hub](https://huggingface.co/models?library=diffusers&sort=downloads) for 14000+ checkpoints):
6281

6382
```python
6483
from diffusers import DiffusionPipeline
@@ -141,12 +160,12 @@ just hang out ☕.
141160
</tr>
142161
<tr>
143162
<td>Text-to-Image</td>
144-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/unclip">unclip</a></td>
163+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/unclip">unCLIP</a></td>
145164
<td><a href="https://huggingface.co/kakaobrain/karlo-v1-alpha"> kakaobrain/karlo-v1-alpha </a></td>
146165
</tr>
147166
<tr>
148167
<td>Text-to-Image</td>
149-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/if">DeepFloyd IF</a></td>
168+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/deepfloyd_if">DeepFloyd IF</a></td>
150169
<td><a href="https://huggingface.co/DeepFloyd/IF-I-XL-v1.0"> DeepFloyd/IF-I-XL-v1.0 </a></td>
151170
</tr>
152171
<tr>
@@ -156,12 +175,12 @@ just hang out ☕.
156175
</tr>
157176
<tr style="border-top: 2px solid black">
158177
<td>Text-guided Image-to-Image</td>
159-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/controlnet">Controlnet</a></td>
178+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/controlnet">ControlNet</a></td>
160179
<td><a href="https://huggingface.co/lllyasviel/sd-controlnet-canny"> lllyasviel/sd-controlnet-canny </a></td>
161180
</tr>
162181
<tr>
163182
<td>Text-guided Image-to-Image</td>
164-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/pix2pix">Instruct Pix2Pix</a></td>
183+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/pix2pix">InstructPix2Pix</a></td>
165184
<td><a href="https://huggingface.co/timbrooks/instruct-pix2pix"> timbrooks/instruct-pix2pix </a></td>
166185
</tr>
167186
<tr>
@@ -171,7 +190,7 @@ just hang out ☕.
171190
</tr>
172191
<tr style="border-top: 2px solid black">
173192
<td>Text-guided Image Inpainting</td>
174-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/inpaint">Stable Diffusion Inpaint</a></td>
193+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/inpaint">Stable Diffusion Inpainting</a></td>
175194
<td><a href="https://huggingface.co/runwayml/stable-diffusion-inpainting"> runwayml/stable-diffusion-inpainting </a></td>
176195
</tr>
177196
<tr style="border-top: 2px solid black">
@@ -202,9 +221,9 @@ just hang out ☕.
202221
- https://github.com/deep-floyd/IF
203222
- https://github.com/bentoml/BentoML
204223
- https://github.com/bmaltais/kohya_ss
205-
- +3000 other amazing GitHub repositories 💪
224+
- +6000 other amazing GitHub repositories 💪
206225

207-
Thank you for using us ❤️
226+
Thank you for using us ❤️.
208227

209228
## Credits
210229

‎docs/TRANSLATING.md

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
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
### Translating the Diffusers documentation into your language
214

315
As part of our mission to democratize machine learning, we'd love to make the Diffusers library available in many more languages! Follow the steps below if you want to help translate the documentation into your language 🙏.
416

517
**🗞️ Open an issue**
618

7-
To get started, navigate to the [Issues](https://github.com/huggingface/diffusers/issues) page of this repo and check if anyone else has opened an issue for your language. If not, open a new issue by selecting the "Translation template" from the "New issue" button.
19+
To get started, navigate to the [Issues](https://github.com/huggingface/diffusers/issues) page of this repo and check if anyone else has opened an issue for your language. If not, open a new issue by selecting the "🌐 Translating a New Language?" from the "New issue" button.
820

921
Once an issue exists, post a comment to indicate which chapters you'd like to work on, and we'll add your name to the list.
1022

@@ -16,7 +28,7 @@ First, you'll need to [fork the Diffusers repo](https://docs.github.com/en/get-s
1628
Once you've forked the repo, you'll want to get the files on your local machine for editing. You can do that by cloning the fork with Git as follows:
1729

1830
```bash
19-
git clone https://github.com/YOUR-USERNAME/diffusers.git
31+
git clone https://github.com/<YOUR-USERNAME>/diffusers.git
2032
```
2133

2234
**📋 Copy-paste the English version with a new language code**
@@ -29,18 +41,18 @@ You'll only need to copy the files in the [`docs/source/en`](https://github.com/
2941

3042
```bash
3143
cd ~/path/to/diffusers/docs
32-
cp -r source/en source/LANG-ID
44+
cp -r source/en source/<LANG-ID>
3345
```
3446

35-
Here, `LANG-ID` should be one of the ISO 639-1 or ISO 639-2 language codes -- see [here](https://www.loc.gov/standards/iso639-2/php/code_list.php) for a handy table.
47+
Here, `<LANG-ID>` should be one of the ISO 639-1 or ISO 639-2 language codes -- see [here](https://www.loc.gov/standards/iso639-2/php/code_list.php) for a handy table.
3648

3749
**✍️ Start translating**
3850

3951
The fun part comes - translating the text!
4052

4153
The first thing we recommend is translating the part of the `_toctree.yml` file that corresponds to your doc chapter. This file is used to render the table of contents on the website.
4254

43-
> 🙋 If the `_toctree.yml` file doesn't yet exist for your language, you can create one by copy-pasting from the English version and deleting the sections unrelated to your chapter. Just make sure it exists in the `docs/source/LANG-ID/` directory!
55+
> 🙋 If the `_toctree.yml` file doesn't yet exist for your language, you can create one by copy-pasting from the English version and deleting the sections unrelated to your chapter. Just make sure it exists in the `docs/source/<LANG-ID>/` directory!
4456
4557
The fields you should add are `local` (with the name of the file containing the translation; e.g. `autoclass_tutorial`), and `title` (with the title of the doc in your language; e.g. `Load pretrained instances with an AutoClass`) -- as a reference, here is the `_toctree.yml` for [English](https://github.com/huggingface/diffusers/blob/main/docs/source/en/_toctree.yml):
4658

‎setup.py

+29-24
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"""
1616
Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/main/setup.py
1717
18-
To create the package for pypi.
18+
To create the package for PyPI.
1919
2020
1. Run `make pre-release` (or `make pre-patch` for a patch release) then run `make fix-copies` to fix the index of the
2121
documentation.
2222
23-
If releasing on a special branch, copy the updated README.md on the main branch for your the commit you will make
23+
If releasing on a special branch, copy the updated README.md on the main branch for the commit you will make
2424
for the post-release and run `make fix-copies` on the main branch as well.
2525
2626
2. Run Tests for Amazon Sagemaker. The documentation is located in `./tests/sagemaker/README.md`, otherwise @philschmid.
@@ -30,29 +30,29 @@
3030
4. Checkout the release branch (v<RELEASE>-release, for example v4.19-release), and commit these changes with the
3131
message: "Release: <RELEASE>" and push.
3232
33-
5. Wait for the tests on main to be completed and be green (otherwise revert and fix bugs)
33+
5. Wait for the tests on main to be completed and be green (otherwise revert and fix bugs).
3434
35-
6. Add a tag in git to mark the release: "git tag v<RELEASE> -m 'Adds tag v<RELEASE> for pypi' "
35+
6. Add a tag in git to mark the release: "git tag v<RELEASE> -m 'Adds tag v<RELEASE> for PyPI'"
3636
Push the tag to git: git push --tags origin v<RELEASE>-release
3737
3838
7. Build both the sources and the wheel. Do not change anything in setup.py between
3939
creating the wheel and the source distribution (obviously).
4040
41-
For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
42-
(this will build a wheel for the python version you use to build it).
41+
For the wheel, run: "python setup.py bdist_wheel" in the top level directory
42+
(This will build a wheel for the Python version you use to build it).
4343
4444
For the sources, run: "python setup.py sdist"
4545
You should now have a /dist directory with both .whl and .tar.gz source versions.
4646
4747
Long story cut short, you need to run both before you can upload the distribution to the
48-
test pypi and the actual pypi servers:
48+
test PyPI and the actual PyPI servers:
4949
5050
python setup.py bdist_wheel && python setup.py sdist
5151
52-
8. Check that everything looks correct by uploading the package to the pypi test server:
52+
8. Check that everything looks correct by uploading the package to the PyPI test server:
5353
5454
twine upload dist/* -r pypitest
55-
(pypi suggest using twine as other methods upload files via plaintext.)
55+
(pypi suggests using twine as other methods upload files via plaintext.)
5656
You may have to specify the repository url, use the following command then:
5757
twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/
5858
@@ -64,20 +64,21 @@
6464
pip install -i https://testpypi.python.org/pypi diffusers
6565
6666
Check you can run the following commands:
67-
python -c "python -c "from diffusers import __version__; print(__version__)"
67+
python -c "from diffusers import __version__; print(__version__)"
6868
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('fusing/unet-ldm-dummy-update'); pipe()"
6969
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('hf-internal-testing/tiny-stable-diffusion-pipe', safety_checker=None); pipe('ah suh du')"
7070
python -c "from diffusers import *"
7171
72-
9. Upload the final version to actual pypi:
72+
9. Upload the final version to the actual PyPI:
7373
twine upload dist/* -r pypi
7474
75-
10. Prepare the release notes and publish them on github once everything is looking hunky-dory.
75+
10. Prepare the release notes and publish them on GitHub once everything is looking hunky-dory.
7676
7777
11. Run `make post-release` (or, for a patch release, `make post-patch`). If you were on a branch for the release,
7878
you need to go back to main before executing this.
7979
"""
8080

81+
import sys
8182
import os
8283
import re
8384
from distutils.core import Command
@@ -142,7 +143,7 @@
142143
# anywhere. If you need to quickly access the data from this table in a shell, you can do so easily with:
143144
#
144145
# python -c 'import sys; from diffusers.dependency_versions_table import deps; \
145-
# print(" ".join([ deps[x] for x in sys.argv[1:]]))' tokenizers datasets
146+
# print(" ".join([deps[x] for x in sys.argv[1:]]))' tokenizers datasets
146147
#
147148
# Just pass the desired package names to that script as it's shown with 2 packages above.
148149
#
@@ -151,7 +152,7 @@
151152
# You can then feed this for example to `pip`:
152153
#
153154
# pip install -U $(python -c 'import sys; from diffusers.dependency_versions_table import deps; \
154-
# print(" ".join([ deps[x] for x in sys.argv[1:]]))' tokenizers datasets)
155+
# print(" ".join([deps[x] for x in sys.argv[1:]]))' tokenizers datasets)
155156
#
156157

157158

@@ -182,7 +183,7 @@ def run(self):
182183
content = [
183184
"# THIS FILE HAS BEEN AUTOGENERATED. To update:",
184185
"# 1. modify the `_deps` dict in setup.py",
185-
"# 2. run `make deps_table_update``",
186+
"# 2. run `make deps_table_update`",
186187
"deps = {",
187188
entries,
188189
"}",
@@ -194,7 +195,6 @@ def run(self):
194195
f.write("\n".join(content))
195196

196197

197-
extras = {}
198198

199199

200200
extras = {}
@@ -242,6 +242,8 @@ def run(self):
242242
deps["Pillow"],
243243
]
244244

245+
version_range_max = max(sys.version_info[1], 10) + 1
246+
245247
setup(
246248
name="diffusers",
247249
version="0.24.0.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
@@ -268,30 +270,33 @@ def run(self):
268270
"Intended Audience :: Science/Research",
269271
"License :: OSI Approved :: Apache Software License",
270272
"Operating System :: OS Independent",
271-
"Programming Language :: Python :: 3",
272-
"Programming Language :: Python :: 3.8",
273-
"Programming Language :: Python :: 3.9",
274273
"Topic :: Scientific/Engineering :: Artificial Intelligence",
274+
"Programming Language :: Python :: 3",
275+
]
276+
+ [
277+
f"Programming Language :: Python :: 3.{i}"
278+
for i in range(8, version_range_max)
275279
],
276280
cmdclass={"deps_table_update": DepsTableUpdateCommand},
277281
)
278282

283+
279284
# Release checklist
280285
# 1. Change the version in __init__.py and setup.py.
281286
# 2. Commit these changes with the message: "Release: Release"
282-
# 3. Add a tag in git to mark the release: "git tag RELEASE -m 'Adds tag RELEASE for pypi' "
287+
# 3. Add a tag in git to mark the release: "git tag RELEASE -m 'Adds tag RELEASE for PyPI'"
283288
# Push the tag to git: git push --tags origin main
284289
# 4. Run the following commands in the top-level directory:
285290
# python setup.py bdist_wheel
286291
# python setup.py sdist
287-
# 5. Upload the package to the pypi test server first:
292+
# 5. Upload the package to the PyPI test server first:
288293
# twine upload dist/* -r pypitest
289294
# twine upload dist/* -r pypitest --repository-url=https://test.pypi.org/legacy/
290295
# 6. Check that you can install it in a virtualenv by running:
291296
# pip install -i https://testpypi.python.org/pypi diffusers
292297
# diffusers env
293298
# diffusers test
294-
# 7. Upload the final version to actual pypi:
299+
# 7. Upload the final version to the actual PyPI:
295300
# twine upload dist/* -r pypi
296-
# 8. Add release notes to the tag in github once everything is looking hunky-dory.
297-
# 9. Update the version in __init__.py, setup.py to the new version "-dev" and push to master
301+
# 8. Add release notes to the tag in GitHub once everything is looking hunky-dory.
302+
# 9. Update the version in __init__.py, setup.py to the new version "-dev" and push to main.

‎src/diffusers/dependency_versions_table.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE HAS BEEN AUTOGENERATED. To update:
22
# 1. modify the `_deps` dict in setup.py
3-
# 2. run `make deps_table_update``
3+
# 2. run `make deps_table_update`
44
deps = {
55
"Pillow": "Pillow",
66
"accelerate": "accelerate>=0.11.0",

0 commit comments

Comments
 (0)
Please sign in to comment.