source stringclasses 273
values | url stringlengths 47 172 | file_type stringclasses 1
value | chunk stringlengths 1 512 | chunk_id stringlengths 5 9 |
|---|---|---|---|---|
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#inference | .md | frames = pipe(prompt, guidance_scale=6, use_dynamic_cfg=True).frames[0]
export_to_video(frames, "output.mp4", fps=8)
``` | 38_6_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | While testing using the diffusers library, all optimizations included in the diffusers library were enabled. This
scheme has not been tested for actual memory usage on devices outside of **NVIDIA A100 / H100** architectures.
Generally, this scheme can be adapted to all **NVIDIA Ampere architecture** and above devices. ... | 38_7_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | disabled, memory consumption will multiply, with peak memory usage being about 3 times the value in the table.
However, speed will increase by about 3-4 times. You can selectively disable some optimizations, including:
```
pipe.enable_sequential_cpu_offload()
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()
```
+... | 38_7_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | ```
+ For multi-GPU inference, the `enable_sequential_cpu_offload()` optimization needs to be disabled.
+ Using INT8 models will slow down inference, which is done to accommodate lower-memory GPUs while maintaining minimal
video quality loss, though inference speed will significantly decrease.
+ The CogVideoX-2B mode... | 38_7_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | We recommend using the precision in which the model was trained for inference.
+ [PytorchAO](https://github.com/pytorch/ao) and [Optimum-quanto](https://github.com/huggingface/optimum-quanto/) can be
used to quantize the text encoder, transformer, and VAE modules to reduce the memory requirements of CogVideoX. This
all... | 38_7_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | allows the model to run on free T4 Colabs or GPUs with smaller memory! Also, note that TorchAO quantization is fully
compatible with `torch.compile`, which can significantly improve inference speed. FP8 precision must be used on
devices with NVIDIA H100 and above, requiring source installation of `torch`, `torchao`, `d... | 38_7_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | + The inference speed tests also used the above memory optimization scheme. Without memory optimization, inference speed
increases by about 10%. Only the `diffusers` version of the model supports quantization.
+ The model only supports English input; other languages can be translated into English for use via large mode... | 38_7_5 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | refinement.
+ The memory usage of model fine-tuning is tested in an `8 * H100` environment, and the program automatically
uses `Zero 2` optimization. If a specific number of GPUs is marked in the table, that number or more GPUs must be used
for fine-tuning.
| **Attribute** | **CogVideoX-2B** ... | 38_7_6 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | | ------------------------------------ | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| **Model Name** | CogVideoX-2B | CogVideoX-5B ... | 38_7_7 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | | **Inference Precision** | FP16* (Recommended), BF16, FP32, FP8*, INT8, Not supported INT4 | BF16 (Recommended), FP16, FP32, FP8*, INT8, Not supported INT4 |
| **Single GPU Inference VRAM** | FP16: Using diffusers 12.5GB* INT8: Using diffusers with torchao 7.8GB* | BF16: Using diffu... | 38_7_8 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | | **Multi GPU Inference VRAM** | FP16: Using diffusers 10GB* | BF16: Using diffusers 15GB* |
| **Inference Speed** | Single A100: ~90 seconds, Single H100: ~45 seconds | Single A100: ~18... | 38_7_9 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/cogvideox.md | https://huggingface.co/docs/diffusers/en/training/cogvideox/#reduce-memory-usage | .md | | **Fine-tuning Precision** | FP16 | BF16 |
| **Fine-tuning VRAM Consumption** | 47 GB (bs=1, LORA) 61 GB (bs=2, LORA) 62GB (bs=1, SFT) | 63 GB (bs=1, LORA) ... | 38_7_10 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/ | .md | <!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 39_0_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/ | .md | an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
--> | 39_0_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-contribute-to-diffusers- | .md | We ❤️ contributions from the open-source community! Everyone is welcome, and all types of participation –not just code– are valued and appreciated. Answering questions, helping others, reaching out, and improving the documentation are all immensely valuable to the community, so don't be afraid and get involved if you'r... | 39_1_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-contribute-to-diffusers- | .md | Everyone is encouraged to start by saying 👋 in our public Discord channel. We discuss the latest trends in diffusion models, ask questions, show off personal projects, help each other with contributions, or just hang out ☕. <a href="https://Discord.gg/G7tWnz98XR"><img alt="Join us on Discord" src="https://img.shields.... | 39_1_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-contribute-to-diffusers- | .md | Whichever way you choose to contribute, we strive to be part of an open, welcoming, and kind community. Please, read our [code of conduct](https://github.com/huggingface/diffusers/blob/main/CODE_OF_CONDUCT.md) and be mindful to respect it during your interactions. We also recommend you become familiar with the [ethical... | 39_1_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-contribute-to-diffusers- | .md | We enormously value feedback from the community, so please do not be afraid to speak up if you believe you have valuable feedback that can help improve the library - every message, comment, issue, and pull request (PR) is read and considered. | 39_1_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#overview | .md | You can contribute in many ways ranging from answering questions on issues and discussions to adding new diffusion models to the core library.
In the following, we give an overview of different ways to contribute, ranked by difficulty in ascending order. All of them are valuable to the community.
* 1. Asking and an... | 39_2_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#overview | .md | * 2. Opening new issues on [the GitHub Issues tab](https://github.com/huggingface/diffusers/issues/new/choose) or new discussions on [the GitHub Discussions tab](https://github.com/huggingface/diffusers/discussions/new/choose).
* 3. Answering issues on [the GitHub Issues tab](https://github.com/huggingface/diffusers/is... | 39_2_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#overview | .md | * 4. Fix a simple issue, marked by the "Good first issue" label, see [here](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
* 5. Contribute to the [documentation](https://github.com/huggingface/diffusers/tree/main/docs/source).
* 6. Contribute a [Community Pipelin... | 39_2_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#overview | .md | * 7. Contribute to the [examples](https://github.com/huggingface/diffusers/tree/main/examples).
* 8. Fix a more difficult issue, marked by the "Good second issue" label, see [here](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+second+issue%22). | 39_2_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#overview | .md | * 9. Add a new pipeline, model, or scheduler, see ["New Pipeline/Model"](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+pipeline%2Fmodel%22) and ["New scheduler"](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+scheduler%22) issues. For this c... | 39_2_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#overview | .md | As said before, **all contributions are valuable to the community**.
In the following, we will explain each contribution a bit more in detail.
For all contributions 4 - 9, you will need to open a PR. It is explained in detail how to do so in [Opening a pull request](#how-to-open-a-pr). | 39_2_5 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | Any question or comment related to the Diffusers library can be asked on the [discussion forum](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/) or on [Discord](https://discord.gg/G7tWnz98XR). Such questions and comments include (but are not limited to):
- Reports of training ... | 39_3_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | - Presentation of personal projects
- Questions to non-official training examples
- Project proposals
- General feedback
- Paper summaries
- Asking for help on personal projects that build on top of the Diffusers library
- General questions
- Ethical questions regarding diffusion models
- ...
Every question that is a... | 39_3_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | share knowledge and might very well help a beginner in the future who has the same question you're
having. Please do pose any questions you might have.
In the same spirit, you are of immense help to the community by answering such questions because this way you are publicly documenting knowledge for everybody to learn ... | 39_3_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | **Please** keep in mind that the more effort you put into asking or answering a question, the higher
the quality of the publicly documented knowledge. In the same way, well-posed and well-answered questions create a high-quality knowledge database accessible to everybody, while badly posed questions or answers reduce t... | 39_3_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | In short, a high quality question or answer is *precise*, *concise*, *relevant*, *easy-to-understand*, *accessible*, and *well-formatted/well-posed*. For more information, please have a look through the [How to write a good issue](#how-to-write-a-good-issue) section.
**NOTE about channels**: | 39_3_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | **NOTE about channels**:
[*The forum*](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63) is much better indexed by search engines, such as Google. Posts are ranked by popularity rather than chronologically. Hence, it's easier to look up questions and answers that we posted so... | 39_3_5 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | In contrast, *Discord* has a chat-like format that invites fast back-and-forth communication.
While it will most likely take less time for you to get an answer to your question on Discord, your | 39_3_6 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#1-asking-and-answering-questions-on-the-diffusers-discussion-forum-or-on-the-diffusers-discord | .md | question won't be visible anymore over time. Also, it's much harder to find information that was posted a while back on Discord. We therefore strongly recommend using the forum for high-quality questions and answers in an attempt to create long-lasting knowledge for the community. If discussions on Discord lead to very... | 39_3_7 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#2-opening-new-issues-on-the-github-issues-tab | .md | The 🧨 Diffusers library is robust and reliable thanks to the users who notify us of
the problems they encounter. So thank you for reporting an issue.
Remember, GitHub issues are reserved for technical questions directly related to the Diffusers library, bug reports, feature requests, or feedback on the library desig... | 39_4_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#2-opening-new-issues-on-the-github-issues-tab | .md | In a nutshell, this means that everything that is **not** related to the **code of the Diffusers library** (including the documentation) should **not** be asked on GitHub, but rather on either the [forum](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63) or [Discord](https://... | 39_4_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#2-opening-new-issues-on-the-github-issues-tab | .md | **Please consider the following guidelines when opening a new issue**:
- Make sure you have searched whether your issue has already been asked before (use the search bar on GitHub under Issues).
- Please never report a new issue on another (related) issue. If another issue is highly related, please
open a new issue nev... | 39_4_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#2-opening-new-issues-on-the-github-issues-tab | .md | open a new issue nevertheless and link to the related issue.
- Make sure your issue is written in English. Please use one of the great, free online translation services, such as [DeepL](https://www.deepl.com/translator) to translate from your native language to English if you are not comfortable in English. | 39_4_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#2-opening-new-issues-on-the-github-issues-tab | .md | - Check whether your issue might be solved by updating to the newest Diffusers version. Before posting your issue, please make sure that `python -c "import diffusers; print(diffusers.__version__)"` is higher or matches the latest Diffusers version.
- Remember that the more effort you put into opening a new issue, the h... | 39_4_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#21-reproducible-minimal-bug-reports | .md | A bug report should always have a reproducible code snippet and be as minimal and concise as possible.
This means in more detail:
- Narrow the bug down as much as you can, **do not just dump your whole code file**.
- Format your code.
- Do not include any external libraries except for Diffusers depending on them.
- **A... | 39_5_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#21-reproducible-minimal-bug-reports | .md | - Explain the issue. If the reader doesn't know what the issue is and why it is an issue, (s)he cannot solve it.
- **Always** make sure the reader can reproduce your issue with as little effort as possible. If your code snippet cannot be run because of missing libraries or undefined variables, the reader cannot help yo... | 39_5_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#21-reproducible-minimal-bug-reports | .md | - If in order to reproduce your issue a model and/or dataset is required, make sure the reader has access to that model or dataset. You can always upload your model or dataset to the [Hub](https://huggingface.co) to make it easily downloadable. Try to keep your model and dataset as small as possible, to make the reprod... | 39_5_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#21-reproducible-minimal-bug-reports | .md | For more information, please have a look through the [How to write a good issue](#how-to-write-a-good-issue) section.
You can open a bug report [here](https://github.com/huggingface/diffusers/issues/new?assignees=&labels=bug&projects=&template=bug-report.yml). | 39_5_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#22-feature-requests | .md | A world-class feature request addresses the following points:
1. Motivation first:
* Is it related to a problem/frustration with the library? If so, please explain
why. Providing a code snippet that demonstrates the problem is best.
* Is it related to something you would need for a project? We'd love to hear
about it... | 39_6_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#22-feature-requests | .md | Awesome! Tell us what problem it solved for you.
2. Write a *full paragraph* describing the feature;
3. Provide a **code snippet** that demonstrates its future use;
4. In case this is related to a paper, please attach a link;
5. Attach any additional information (drawings, screenshots, etc.) you think may help.
You c... | 39_6_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#23-feedback | .md | Feedback about the library design and why it is good or not good helps the core maintainers immensely to build a user-friendly library. To understand the philosophy behind the current design philosophy, please have a look [here](https://huggingface.co/docs/diffusers/conceptual/philosophy). If you feel like a certain de... | 39_7_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#23-feedback | .md | please explain why and how it should be changed. If a certain design choice follows the design philosophy too much, hence restricting use cases, explain why and how it should be changed. | 39_7_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#23-feedback | .md | If a certain design choice is very useful for you, please also leave a note as this is great feedback for future design decisions.
You can open an issue about feedback [here](https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feedback.md&title=). | 39_7_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#24-technical-questions | .md | Technical questions are mainly about why certain code of the library was written in a certain way, or what a certain part of the code does. Please make sure to link to the code in question and please provide details on
why this part of the code is difficult to understand.
You can open an issue about a technical quest... | 39_8_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#25-proposal-to-add-a-new-model-scheduler-or-pipeline | .md | If the diffusion model community released a new model, pipeline, or scheduler that you would like to see in the Diffusers library, please provide the following information:
* Short description of the diffusion pipeline, model, or scheduler and link to the paper or public release.
* Link to any of its open-source impl... | 39_9_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#25-proposal-to-add-a-new-model-scheduler-or-pipeline | .md | If you are willing to contribute to the model yourself, let us know so we can best guide you. Also, don't forget
to tag the original author of the component (model, scheduler, pipeline, etc.) by GitHub handle if you can find it.
You can open a request for a model/pipeline/scheduler [here](https://github.com/huggingfa... | 39_9_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#3-answering-issues-on-the-github-issues-tab | .md | Answering issues on GitHub might require some technical knowledge of Diffusers, but we encourage everybody to give it a try even if you are not 100% certain that your answer is correct.
Some tips to give a high-quality answer to an issue:
- Be as concise and minimal as possible.
- Stay on topic. An answer to the issue ... | 39_10_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#3-answering-issues-on-the-github-issues-tab | .md | - Provide links to code, papers, or other sources that prove or encourage your point.
- Answer in code. If a simple code snippet is the answer to the issue or shows how the issue can be solved, please provide a fully reproducible code snippet.
Also, many issues tend to be simply off-topic, duplicates of other issues,... | 39_10_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#3-answering-issues-on-the-github-issues-tab | .md | help to the maintainers if you can answer such issues, encouraging the author of the issue to be
more precise, provide the link to a duplicated issue or redirect them to [the forum](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63) or [Discord](https://discord.gg/G7tWnz98XR).... | 39_10_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#3-answering-issues-on-the-github-issues-tab | .md | please have a look at the next sections.
For all of the following contributions, you will need to open a PR. It is explained in detail how to do so in the [Opening a pull request](#how-to-open-a-pr) section. | 39_10_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#4-fixing-a-good-first-issue | .md | *Good first issues* are marked by the [Good first issue](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) label. Usually, the issue already
explains how a potential solution should look so that it is easier to fix.
If the issue hasn't been closed and you would like ... | 39_11_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#4-fixing-a-good-first-issue | .md | - a.) The issue description already proposes a fix. In this case and if the solution makes sense to you, you can open a PR or draft PR to fix it.
- b.) The issue description does not propose a fix. In this case, you can ask what a proposed fix could look like and someone from the Diffusers team should answer shortly. I... | 39_11_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#4-fixing-a-good-first-issue | .md | - c.) There is already an open PR to fix the issue, but the issue hasn't been closed yet. If the PR has gone stale, you can simply open a new PR and link to the stale PR. PRs often go stale if the original contributor who wanted to fix the issue suddenly cannot find the time anymore to proceed. This often happens in op... | 39_11_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#4-fixing-a-good-first-issue | .md | very happy if you give it a new try and leverage the knowledge of the existing PR. If there is already a PR and it is active, you can help the author by giving suggestions, reviewing the PR or even asking whether you can contribute to the PR. | 39_11_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#5-contribute-to-the-documentation | .md | A good library **always** has good documentation! The official documentation is often one of the first points of contact for new users of the library, and therefore contributing to the documentation is a **highly
valuable contribution**.
Contributing to the library can have many forms:
- Correcting spelling or gram... | 39_12_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#5-contribute-to-the-documentation | .md | valuable contribution**.
Contributing to the library can have many forms:
- Correcting spelling or grammatical errors.
- Correct incorrect formatting of the docstring. If you see that the official documentation is weirdly displayed or a link is broken, we would be very happy if you take some time to correct it.
- C... | 39_12_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#5-contribute-to-the-documentation | .md | - Clarify documentation that is hard to understand or incorrect.
- Update outdated code examples.
- Translating the documentation to another language.
Anything displayed on [the official Diffusers doc page](https://huggingface.co/docs/diffusers/index) is part of the official documentation and can be corrected, adjust... | 39_12_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#5-contribute-to-the-documentation | .md | Please have a look at [this page](https://github.com/huggingface/diffusers/tree/main/docs) on how to verify changes made to the documentation locally. | 39_12_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | > [!TIP] | 39_13_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | > Read the [Community pipelines](../using-diffusers/custom_pipeline_overview#community-pipelines) guide to learn more about the difference between a GitHub and Hugging Face Hub community pipeline. If you're interested in why we have community pipelines, take a look at GitHub Issue [#841](https://github.com/huggingface/... | 39_13_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | Contributing a community pipeline is a great way to share your creativity and work with the community. It lets you build on top of the [`DiffusionPipeline`] so that anyone can load and use it by setting the `custom_pipeline` parameter. This section will walk you through how to create a simple pipeline where the UNet on... | 39_13_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | 1. Create a one_step_unet.py file for your community pipeline. This file can contain whatever package you want to use as long as it's installed by the user. Make sure you only have one pipeline class that inherits from [`DiffusionPipeline`] to load model weights and the scheduler configuration from the Hub. Add a UNet ... | 39_13_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | You should also add the `register_modules` function to ensure your pipeline and its components can be saved with [`~DiffusionPipeline.save_pretrained`].
```py
from diffusers import DiffusionPipeline
import torch | 39_13_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | class UnetSchedulerOneForwardPipeline(DiffusionPipeline):
def __init__(self, unet, scheduler):
super().__init__()
self.register_modules(unet=unet, scheduler=scheduler)
```
1. In the forward pass (which we recommend defining as `__call__`), you can add any feature you'd like. For the "one-step" pipeline, create a ran... | 39_13_5 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | class UnetSchedulerOneForwardPipeline(DiffusionPipeline):
def __init__(self, unet, scheduler):
super().__init__()
self.register_modules(unet=unet, scheduler=scheduler)
def __call__(self):
image = torch.randn(
(1, self.unet.config.in_channels, self.unet.config.sample_size, self.unet.config.sample_size),
)
timestep = 1... | 39_13_6 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | return scheduler_output
```
Now you can run the pipeline by passing a UNet and scheduler to it or load pretrained weights if the pipeline structure is identical.
```py
from diffusers import DDPMScheduler, UNet2DModel
scheduler = DDPMScheduler()
unet = UNet2DModel() | 39_13_7 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | pipeline = UnetSchedulerOneForwardPipeline(unet=unet, scheduler=scheduler)
output = pipeline()
# load pretrained weights
pipeline = UnetSchedulerOneForwardPipeline.from_pretrained("google/ddpm-cifar10-32", use_safetensors=True)
output = pipeline()
```
You can either share your pipeline as a GitHub community pipeline ... | 39_13_8 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | <hfoptions id="pipeline type">
<hfoption id="GitHub pipeline">
Share your GitHub pipeline by opening a pull request on the Diffusers [repository](https://github.com/huggingface/diffusers) and add the one_step_unet.py file to the [examples/community](https://github.com/huggingface/diffusers/tree/main/examples/communit... | 39_13_9 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#6-contribute-a-community-pipeline | .md | Share your Hub pipeline by creating a model repository on the Hub and uploading the one_step_unet.py file to it.
</hfoption>
</hfoptions> | 39_13_10 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | Diffusers examples are a collection of training scripts that reside in [examples](https://github.com/huggingface/diffusers/tree/main/examples).
We support two types of training examples:
- Official training examples
- Research training examples | 39_14_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | We support two types of training examples:
- Official training examples
- Research training examples
Research training examples are located in [examples/research_projects](https://github.com/huggingface/diffusers/tree/main/examples/research_projects) whereas official training examples include all folders under [exa... | 39_14_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | The official training examples are maintained by the Diffusers' core maintainers whereas the research training examples are maintained by the community.
This is because of the same reasons put forward in [6. Contribute a community pipeline](#6-contribute-a-community-pipeline) for official pipelines vs. community pipeli... | 39_14_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | If the Diffusers core maintainers and the community consider a certain training paradigm to be too experimental or not popular enough, the corresponding training code should be put in the `research_projects` folder and maintained by the author.
Both official training and research examples consist of a directory that ... | 39_14_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | training examples, it is required to clone the repository:
```bash
git clone https://github.com/huggingface/diffusers
```
as well as to install all additional dependencies required for training:
```bash
cd diffusers
pip install -r examples/<your-example-folder>/requirements.txt
``` | 39_14_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | ```bash
cd diffusers
pip install -r examples/<your-example-folder>/requirements.txt
```
Therefore when adding an example, the `requirements.txt` file shall define all pip dependencies required for your training example so that once all those are installed, the user can run the example's training script. See, for exam... | 39_14_5 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | Training examples of the Diffusers library should adhere to the following philosophy:
- All the code necessary to run the examples should be found in a single Python file.
- One should be able to run the example from the command line with `python <your-example>.py --args`. | 39_14_6 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | - One should be able to run the example from the command line with `python <your-example>.py --args`.
- Examples should be kept simple and serve as **an example** on how to use Diffusers for training. The purpose of example scripts is **not** to create state-of-the-art diffusion models, but rather to reproduce known tr... | 39_14_7 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | To contribute an example, it is highly recommended to look at already existing examples such as [dreambooth](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth.py) to get an idea of how they should look like.
We strongly advise contributors to make use of the [Accelerate library](ht... | 39_14_8 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | with Diffusers.
Once an example script works, please make sure to add a comprehensive `README.md` that states how to use the example exactly. This README should include:
- An example command on how to run the example script as shown [here](https://github.com/huggingface/diffusers/tree/main/examples/dreambooth#running-l... | 39_14_9 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | - If you are adding a non-official/research training example, **please don't forget** to add a sentence that you are maintaining this training example which includes your git handle as shown [here](https://github.com/huggingface/diffusers/tree/main/examples/research_projects/intel_opts#diffusers-examples-with-intel-opt... | 39_14_10 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#7-contribute-to-training-examples | .md | If you are contributing to the official training examples, please also make sure to add a test to its folder such as [examples/dreambooth/test_dreambooth.py](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/test_dreambooth.py). This is not necessary for non-official training examples. | 39_14_11 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#8-fixing-a-good-second-issue | .md | *Good second issues* are marked by the [Good second issue](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+second+issue%22) label. Good second issues are
usually more complicated to solve than [Good first issues](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aiss... | 39_15_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#8-fixing-a-good-second-issue | .md | a decent understanding of the library by the interested contributor.
If you are interested in tackling a good second issue, feel free to open a PR to fix it and link the PR to the issue. If you see that a PR has already been opened for this issue but did not get merged, have a look to understand why it wasn't merged an... | 39_15_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#8-fixing-a-good-second-issue | .md | Good second issues are usually more difficult to get merged compared to good first issues, so don't hesitate to ask for help from the core maintainers. If your PR is almost finished the core maintainers can also jump into your PR and commit to it in order to get it merged. | 39_15_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#9-adding-pipelines-models-schedulers | .md | Pipelines, models, and schedulers are the most important pieces of the Diffusers library.
They provide easy access to state-of-the-art diffusion technologies and thus allow the community to
build powerful generative AI applications.
By adding a new model, pipeline, or scheduler you might enable a new powerful use cas... | 39_16_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#9-adding-pipelines-models-schedulers | .md | Diffusers has a couple of open feature requests for all three components - feel free to gloss over them
if you don't know yet what specific component you would like to add:
- [Model or pipeline](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+pipeline%2Fmodel%22)
- [Scheduler](http... | 39_16_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#9-adding-pipelines-models-schedulers | .md | - [Scheduler](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+scheduler%22)
Before adding any of the three components, it is strongly recommended that you give the [Philosophy guide](philosophy) a read to better understand the design of any of the three components. Please be awar... | 39_16_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#9-adding-pipelines-models-schedulers | .md | as it will lead to API inconsistencies. If you fundamentally disagree with a design choice, please open a [Feedback issue](https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feedback.md&title=) instead so that it can be discussed whether a certain design pattern/design choice shall be chang... | 39_16_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#9-adding-pipelines-models-schedulers | .md | Please make sure to add links to the original codebase/paper to the PR and ideally also ping the original author directly on the PR so that they can follow the progress and potentially help with questions.
If you are unsure or stuck in the PR, don't hesitate to leave a message to ask for a first review or help. | 39_16_4 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#copied-from-mechanism | .md | A unique and important feature to understand when adding any pipeline, model or scheduler code is the `# Copied from` mechanism. You'll see this all over the Diffusers codebase, and the reason we use it is to keep the codebase easy to understand and maintain. Marking code with the `# Copied from` mechanism forces the m... | 39_17_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#copied-from-mechanism | .md | For example, in the code example below, [`~diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput`] is the original code and `AltDiffusionPipelineOutput` uses the `# Copied from` mechanism to copy it. The only difference is changing the class prefix from `Stable` to `Alt`.
```py
# Copied from diffusers.pi... | 39_17_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#copied-from-mechanism | .md | Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of denoised PIL images of length `batch_size` or NumPy array of shape `(batch_size, height, width,
num_channels)`.
nsfw_content_detected (`List[bool]`)
List indicating whether the corresponding generated image contains "not-safe-for-work" (nsfw) content or
`No... | 39_17_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#copied-from-mechanism | .md | `None` if safety checking could not be performed.
"""
```
To learn more, read this section of the [~Don't~ Repeat Yourself*](https://huggingface.co/blog/transformers-design-philosophy#4-machine-learning-models-are-static) blog post. | 39_17_3 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-write-a-good-issue | .md | **The better your issue is written, the higher the chances that it will be quickly resolved.**
1. Make sure that you've used the correct template for your issue. You can pick between *Bug Report*, *Feature Request*, *Feedback about API Design*, *New model/pipeline/scheduler addition*, *Forum*, or a blank issue. Make ... | 39_18_0 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-write-a-good-issue | .md | 2. **Be precise**: Give your issue a fitting title. Try to formulate your issue description as simple as possible. The more precise you are when submitting an issue, the less time it takes to understand the issue and potentially solve it. Make sure to open an issue for one issue only and not for multiple issues. If you... | 39_18_1 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-write-a-good-issue | .md | 3. **Reproducibility**: No reproducible code snippet == no solution. If you encounter a bug, maintainers **have to be able to reproduce** it. Make sure that you include a code snippet that can be copy-pasted into a Python interpreter to reproduce the issue. Make sure that your code snippet works, *i.e.* that there are ... | 39_18_2 |
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/conceptual/contribution.md | https://huggingface.co/docs/diffusers/en/conceptual/contribution/#how-to-write-a-good-issue | .md | should contain an error message **and** a code snippet that can be copy-pasted without any changes to reproduce the exact same error message. If your issue is using local model weights or local data that cannot be accessed by the reader, the issue cannot be solved. If you cannot share your data or model, try to make a ... | 39_18_3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.