text stringlengths 3 14.4k | source stringclasses 273
values | url stringlengths 47 172 | source_section stringlengths 0 95 | file_type stringclasses 1
value | id stringlengths 3 6 |
|---|---|---|---|---|---|
To save GPU memory and get more speed, set `torch_dtype=torch.float16` to load and run the model weights directly with half-precision weights.
```Python
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"stable-diffusion-v1-5/stable-diffusion-v1-5",
torch_dtype=torch.floa... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/fp16.md | https://huggingface.co/docs/diffusers/en/optimization/fp16/#half-precision-weights | #half-precision-weights | .md | 15_3 |
You could also use a distilled Stable Diffusion model and autoencoder to speed up inference. During distillation, many of the UNet's residual and attention blocks are shed to reduce the model size by 51% and improve latency on CPU/GPU by 43%. The distilled model is faster and uses less memory while generating images of... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/fp16.md | https://huggingface.co/docs/diffusers/en/optimization/fp16/#distilled-model | #distilled-model | .md | 15_4 |
To speed inference up even more, replace the autoencoder with a [distilled version](https://huggingface.co/sayakpaul/taesdxl-diffusers) of it.
```py
import torch
from diffusers import AutoencoderTiny, StableDiffusionPipeline
distilled = StableDiffusionPipeline.from_pretrained(
"nota-ai/bk-sdm-small", torch_dtype=tor... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/fp16.md | https://huggingface.co/docs/diffusers/en/optimization/fp16/#tiny-autoencoder | #tiny-autoencoder | .md | 15_5 |
[xDiT](https://github.com/xdit-project/xDiT) is an inference engine designed for the large scale parallel deployment of Diffusion Transformers (DiTs). xDiT provides a suite of efficient parallel approaches for Diffusion Models, as well as GPU kernel accelerations.
There are four parallel methods supported in xDiT, in... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#xdit | #xdit | .md | 16_0 |
A subset of Diffusers models are supported in xDiT, such as Flux.1, Stable Diffusion 3, etc. The latest supported models can be found [here](https://github.com/xdit-project/xDiT?tab=readme-ov-file#-supported-dits). | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#supported-models | #supported-models | .md | 16_1 |
We tested different models on various machines, and here is some of the benchmark data. | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#benchmark | #benchmark | .md | 16_2 |
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/xDiT/documentation-images/resolve/main/performance/flux/Flux-2k-L40.png">
</div>
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/xDiT/documentation-images/resolve/main/performance/flux/Flux-2K-A100.png">
</div> | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#flux1-schnell | #flux1-schnell | .md | 16_3 |
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/xDiT/documentation-images/resolve/main/performance/sd3/L40-SD3.png">
</div>
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/xDiT/documentation-images/resolve/main/performance/sd3/A100-SD3.png">
</div> | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#stable-diffusion-3 | #stable-diffusion-3 | .md | 16_4 |
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/xDiT/documentation-images/resolve/main/performance/hunuyuandit/L40-HunyuanDiT.png">
</div>
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/xDiT/documentation-images/resolve/main/performance/hunuyuandit/V100-Hunyuan... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#hunyuandit | #hunyuandit | .md | 16_5 |
[xDiT-project](https://github.com/xdit-project/xDiT)
[USP: A Unified Sequence Parallelism Approach for Long Context Generative AI](https://arxiv.org/abs/2405.07719)
[PipeFusion: Displaced Patch Pipeline Parallelism for Inference of Diffusion Transformer Models](https://arxiv.org/abs/2405.14430) | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/xdit.md | https://huggingface.co/docs/diffusers/en/optimization/xdit/#reference | #reference | .md | 16_6 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/mps.md | https://huggingface.co/docs/diffusers/en/optimization/mps/ | .md | 17_0 | |
๐ค Diffusers is compatible with Apple silicon (M1/M2 chips) using the PyTorch [`mps`](https://pytorch.org/docs/stable/notes/mps.html) device, which uses the Metal framework to leverage the GPU on MacOS devices. You'll need to have:
- macOS computer with Apple silicon (M1/M2) hardware
- macOS 12.6 or later (13.0 or la... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/mps.md | https://huggingface.co/docs/diffusers/en/optimization/mps/#metal-performance-shaders-mps | #metal-performance-shaders-mps | .md | 17_1 |
M1/M2 performance is very sensitive to memory pressure. When this occurs, the system automatically swaps if it needs to which significantly degrades performance.
To prevent this from happening, we recommend *attention slicing* to reduce memory pressure during inference and prevent swapping. This is especially relevan... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/mps.md | https://huggingface.co/docs/diffusers/en/optimization/mps/#troubleshoot | #troubleshoot | .md | 17_2 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/onnx.md | https://huggingface.co/docs/diffusers/en/optimization/onnx/ | .md | 18_0 | |
๐ค [Optimum](https://github.com/huggingface/optimum) provides a Stable Diffusion pipeline compatible with ONNX Runtime. You'll need to install ๐ค Optimum with the following command for ONNX Runtime support:
```bash
pip install -q optimum["onnxruntime"]
```
This guide will show you how to use the Stable Diffusion an... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/onnx.md | https://huggingface.co/docs/diffusers/en/optimization/onnx/#onnx-runtime | #onnx-runtime | .md | 18_1 |
To load and run inference, use the [`~optimum.onnxruntime.ORTStableDiffusionPipeline`]. If you want to load a PyTorch model and convert it to the ONNX format on-the-fly, set `export=True`:
```python
from optimum.onnxruntime import ORTStableDiffusionPipeline
model_id = "stable-diffusion-v1-5/stable-diffusion-v1-5"
pi... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/onnx.md | https://huggingface.co/docs/diffusers/en/optimization/onnx/#stable-diffusion | #stable-diffusion | .md | 18_2 |
To load and run inference with SDXL, use the [`~optimum.onnxruntime.ORTStableDiffusionXLPipeline`]:
```python
from optimum.onnxruntime import ORTStableDiffusionXLPipeline
model_id = "stabilityai/stable-diffusion-xl-base-1.0"
pipeline = ORTStableDiffusionXLPipeline.from_pretrained(model_id)
prompt = "sailing ship in ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/onnx.md | https://huggingface.co/docs/diffusers/en/optimization/onnx/#stable-diffusion-xl | #stable-diffusion-xl | .md | 18_3 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/tome.md | https://huggingface.co/docs/diffusers/en/optimization/tome/ | .md | 19_0 | |
[Token merging](https://huggingface.co/papers/2303.17604) (ToMe) merges redundant tokens/patches progressively in the forward pass of a Transformer-based network which can speed-up the inference latency of [`StableDiffusionPipeline`].
Install ToMe from `pip`:
```bash
pip install tomesd
```
You can use ToMe from t... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/tome.md | https://huggingface.co/docs/diffusers/en/optimization/tome/#token-merging | #token-merging | .md | 19_1 |
We also benchmarked the impact of `tomesd` on the [`StableDiffusionPipeline`] with [xFormers](https://huggingface.co/docs/diffusers/optimization/xformers) enabled across several image resolutions. The results are obtained from A100 and V100 GPUs in the following development environment:
```bash
- `diffusers` version:... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/tome.md | https://huggingface.co/docs/diffusers/en/optimization/tome/#benchmarks | #benchmarks | .md | 19_2 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/ | .md | 20_0 | |
[DreamBooth](https://huggingface.co/papers/2208.12242) is a training technique that updates the entire diffusion model by training on just a few images of a subject or style. It works by associating a special word in the prompt with the example images.
If you're training on a GPU with limited vRAM, you should try ena... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#dreambooth | #dreambooth | .md | 20_1 |
<Tip warning={true}>
DreamBooth is very sensitive to training hyperparameters, and it is easy to overfit. Read the [Training Stable Diffusion with Dreambooth using ๐งจ Diffusers](https://huggingface.co/blog/dreambooth) blog post for recommended settings for different subjects to help you choose the appropriate hyperpa... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#script-parameters | #script-parameters | .md | 20_2 |
The [Min-SNR](https://huggingface.co/papers/2303.09556) weighting strategy can help with training by rebalancing the loss to achieve faster convergence. The training script supports predicting `epsilon` (noise) or `v_prediction`, but Min-SNR is compatible with both prediction types. This weighting strategy is only supp... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#min-snr-weighting | #min-snr-weighting | .md | 20_3 |
Prior preservation loss is a method that uses a model's own generated samples to help it learn how to generate more diverse images. Because these generated sample images belong to the same class as the images you provided, they help the model retain what it has learned about the class and how it can use what it already... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#prior-preservation-loss | #prior-preservation-loss | .md | 20_4 |
To improve the quality of the generated outputs, you can also train the text encoder in addition to the UNet. This requires additional memory and you'll need a GPU with at least 24GB of vRAM. If you have the necessary hardware, then training the text encoder produces better results, especially when generating images of... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#train-text-encoder | #train-text-encoder | .md | 20_5 |
DreamBooth comes with its own dataset classes:
- [`DreamBoothDataset`](https://github.com/huggingface/diffusers/blob/072e00897a7cf4302c347a63ec917b4b8add16d4/examples/dreambooth/train_dreambooth.py#L604): preprocesses the images and class images, and tokenizes the prompts for training
- [`PromptDataset`](https://gith... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#training-script | #training-script | .md | 20_6 |
You're now ready to launch the training script! ๐
For this guide, you'll download some images of a [dog](https://huggingface.co/datasets/diffusers/dog-example) and store them in a directory. But remember, you can create and use your own dataset if you want (see the [Create a dataset for training](create_dataset) gui... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#launch-the-script | #launch-the-script | .md | 20_7 |
LoRA is a training technique for significantly reducing the number of trainable parameters. As a result, training is faster and it is easier to store the resulting weights because they are a lot smaller (~100MBs). Use the [train_dreambooth_lora.py](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#lora | #lora | .md | 20_8 |
Stable Diffusion XL (SDXL) is a powerful text-to-image model that generates high-resolution images, and it adds a second text-encoder to its architecture. Use the [train_dreambooth_lora_sdxl.py](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sdxl.py) script to train a SDXL ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#stable-diffusion-xl | #stable-diffusion-xl | .md | 20_9 |
DeepFloyd IF is a cascading pixel diffusion model with three stages. The first stage generates a base image and the second and third stages progressively upscales the base image into a high-resolution 1024x1024 image. Use the [train_dreambooth_lora.py](https://github.com/huggingface/diffusers/blob/main/examples/dreambo... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#deepfloyd-if | #deepfloyd-if | .md | 20_10 |
Training the DeepFloyd IF model can be challenging, but here are some tips that we've found helpful:
- LoRA is sufficient for training the stage 1 model because the model's low resolution makes representing finer details difficult regardless.
- For common or simple objects, you don't necessarily need to finetune the ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#training-tips | #training-tips | .md | 20_11 |
Congratulations on training your DreamBooth model! To learn more about how to use your new model, the following guide may be helpful:
- Learn how to [load a DreamBooth](../using-diffusers/loading_adapters) model for inference if you trained your model with LoRA. | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/dreambooth.md | https://huggingface.co/docs/diffusers/en/training/dreambooth/#next-steps | #next-steps | .md | 20_12 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/ | .md | 21_0 | |
[InstructPix2Pix](https://hf.co/papers/2211.09800) is a Stable Diffusion model trained to edit images from human-provided instructions. For example, your prompt can be "turn the clouds rainy" and the model will edit the input image accordingly. This model is conditioned on the text prompt (or editing instruction) and t... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/#instructpix2pix | #instructpix2pix | .md | 21_1 |
The training script has many parameters to help you customize your training run. All of the parameters and their descriptions are found in the [`parse_args()`](https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L65) function. Defaul... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/#script-parameters | #script-parameters | .md | 21_2 |
The dataset preprocessing code and training loop are found in the [`main()`](https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/instruct_pix2pix/train_instruct_pix2pix.py#L374) function. This is where you'll make your changes to the training script to adapt it for your own u... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/#training-script | #training-script | .md | 21_3 |
Once you're happy with the changes to your script or if you're okay with the default configuration, you're ready to launch the training script! ๐
This guide uses the [fusing/instructpix2pix-1000-samples](https://huggingface.co/datasets/fusing/instructpix2pix-1000-samples) dataset, which is a smaller version of the [... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/#launch-the-script | #launch-the-script | .md | 21_4 |
Stable Diffusion XL (SDXL) is a powerful text-to-image model that generates high-resolution images, and it adds a second text-encoder to its architecture. Use the [`train_instruct_pix2pix_sdxl.py`](https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix_sdxl.py) script to tra... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/#stable-diffusion-xl | #stable-diffusion-xl | .md | 21_5 |
Congratulations on training your own InstructPix2Pix model! ๐ฅณ To learn more about the model, it may be helpful to:
- Read the [Instruction-tuning Stable Diffusion with InstructPix2Pix](https://huggingface.co/blog/instruction-tuning-sd) blog post to learn more about some experiments we've done with InstructPix2Pix, d... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/instructpix2pix.md | https://huggingface.co/docs/diffusers/en/training/instructpix2pix/#next-steps | #next-steps | .md | 21_6 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/ | .md | 22_0 | |
<Tip warning={true}>
The text-to-image script is experimental, and it's easy to overfit and run into issues like catastrophic forgetting. Try exploring different hyperparameters to get the best results on your dataset.
</Tip>
Text-to-image models like Stable Diffusion are conditioned to generate images given a te... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/#text-to-image | #text-to-image | .md | 22_1 |
<Tip>
The following sections highlight parts of the training script that are important for understanding how to modify it, but it doesn't cover every aspect of the script in detail. If you're interested in learning more, feel free to read through the [script](https://github.com/huggingface/diffusers/blob/main/example... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/#script-parameters | #script-parameters | .md | 22_2 |
The [Min-SNR](https://huggingface.co/papers/2303.09556) weighting strategy can help with training by rebalancing the loss to achieve faster convergence. The training script supports predicting `epsilon` (noise) or `v_prediction`, but Min-SNR is compatible with both prediction types. This weighting strategy is only supp... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/#min-snr-weighting | #min-snr-weighting | .md | 22_3 |
The dataset preprocessing code and training loop are found in the [`main()`](https://github.com/huggingface/diffusers/blob/8959c5b9dec1c94d6ba482c94a58d2215c5fd026/examples/text_to_image/train_text_to_image.py#L490) function. If you need to adapt the training script, this is where you'll need to make your changes.
Th... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/#training-script | #training-script | .md | 22_4 |
Once you've made all your changes or you're okay with the default configuration, you're ready to launch the training script! ๐
<hfoptions id="training-inference">
<hfoption id="PyTorch">
Let's train on the [Naruto BLIP captions](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions) dataset to generate y... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/#launch-the-script | #launch-the-script | .md | 22_5 |
Congratulations on training your own text-to-image model! To learn more about how to use your new model, the following guides may be helpful:
- Learn how to [load LoRA weights](../using-diffusers/loading_adapters#LoRA) for inference if you trained your model with LoRA.
- Learn more about how certain parameters like g... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text2image.md | https://huggingface.co/docs/diffusers/en/training/text2image/#next-steps | #next-steps | .md | 22_6 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/overview.md | https://huggingface.co/docs/diffusers/en/training/overview/ | .md | 23_0 | |
๐ค Diffusers provides a collection of training scripts for you to train your own diffusion models. You can find all of our training scripts in [diffusers/examples](https://github.com/huggingface/diffusers/tree/main/examples).
Each training script is:
- **Self-contained**: the training script does not depend on any ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/overview.md | https://huggingface.co/docs/diffusers/en/training/overview/#overview | #overview | .md | 23_1 |
Make sure you can successfully run the latest versions of the example scripts by installing the library from source in a new virtual environment:
```bash
git clone https://github.com/huggingface/diffusers
cd diffusers
pip install .
```
Then navigate to the folder of the training script (for example, [DreamBooth](ht... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/overview.md | https://huggingface.co/docs/diffusers/en/training/overview/#install | #install | .md | 23_2 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/distributed_inference.md | https://huggingface.co/docs/diffusers/en/training/distributed_inference/ | .md | 24_0 | |
On distributed setups, you can run inference across multiple GPUs with ๐ค [Accelerate](https://huggingface.co/docs/accelerate/index) or [PyTorch Distributed](https://pytorch.org/tutorials/beginner/dist_overview.html), which is useful for generating with multiple prompts in parallel.
This guide will show you how to us... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/distributed_inference.md | https://huggingface.co/docs/diffusers/en/training/distributed_inference/#distributed-inference | #distributed-inference | .md | 24_1 |
๐ค [Accelerate](https://huggingface.co/docs/accelerate/index) is a library designed to make it easy to train or run inference across distributed setups. It simplifies the process of setting up the distributed environment, allowing you to focus on your PyTorch code.
To begin, create a Python file and initialize an [`a... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/distributed_inference.md | https://huggingface.co/docs/diffusers/en/training/distributed_inference/#-accelerate | #-accelerate | .md | 24_2 |
PyTorch supports [`DistributedDataParallel`](https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html) which enables data parallelism.
To start, create a Python file and import `torch.distributed` and `torch.multiprocessing` to set up the distributed process group and to spawn the proc... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/distributed_inference.md | https://huggingface.co/docs/diffusers/en/training/distributed_inference/#pytorch-distributed | #pytorch-distributed | .md | 24_3 |
Modern diffusion systems such as [Flux](../api/pipelines/flux) are very large and have multiple models. For example, [Flux.1-Dev](https://hf.co/black-forest-labs/FLUX.1-dev) is made up of two text encoders - [T5-XXL](https://hf.co/google/t5-v1_1-xxl) and [CLIP-L](https://hf.co/openai/clip-vit-large-patch14) - a [diffus... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/distributed_inference.md | https://huggingface.co/docs/diffusers/en/training/distributed_inference/#model-sharding | #model-sharding | .md | 24_4 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/ | .md | 25_0 | |
<Tip warning={true}>
This script is experimental, and it's easy to overfit and run into issues like catastrophic forgetting. Try exploring different hyperparameters to get the best results on your dataset.
</Tip>
Kandinsky 2.2 is a multilingual text-to-image model capable of producing more photorealistic images. ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/#kandinsky-22 | #kandinsky-22 | .md | 25_1 |
The training scripts provides many parameters to help you customize your training run. All of the parameters and their descriptions are found in the [`parse_args()`](https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4da4911dfd655ee/examples/kandinsky2_2/text_to_image/train_text_to_image_prior.py#L1... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/#script-parameters | #script-parameters | .md | 25_2 |
The [Min-SNR](https://huggingface.co/papers/2303.09556) weighting strategy can help with training by rebalancing the loss to achieve faster convergence. The training script supports predicting `epsilon` (noise) or `v_prediction`, but Min-SNR is compatible with both prediction types. This weighting strategy is only supp... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/#min-snr-weighting | #min-snr-weighting | .md | 25_3 |
The training script is also similar to the [Text-to-image](text2image#training-script) training guide, but it's been modified to support training the prior and decoder models. This guide focuses on the code that is unique to the Kandinsky 2.2 training scripts.
<hfoptions id="script">
<hfoption id="prior model">
The... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/#training-script | #training-script | .md | 25_4 |
Once youโve made all your changes or youโre okay with the default configuration, youโre ready to launch the training script! ๐
You'll train on the [Naruto BLIP captions](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions) dataset to generate your own Naruto characters, but you can also create and train ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/#launch-the-script | #launch-the-script | .md | 25_5 |
Congratulations on training a Kandinsky 2.2 model! To learn more about how to use your new model, the following guides may be helpful:
- Read the [Kandinsky](../using-diffusers/kandinsky) guide to learn how to use it for a variety of different tasks (text-to-image, image-to-image, inpainting, interpolation), and how ... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/kandinsky.md | https://huggingface.co/docs/diffusers/en/training/kandinsky/#next-steps | #next-steps | .md | 25_6 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/wuerstchen.md | https://huggingface.co/docs/diffusers/en/training/wuerstchen/ | .md | 26_0 | |
The [Wuerstchen](https://hf.co/papers/2306.00637) model drastically reduces computational costs by compressing the latent space by 42x, without compromising image quality and accelerating inference. During training, Wuerstchen uses two models (VQGAN + autoencoder) to compress the latents, and then a third model (text-c... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/wuerstchen.md | https://huggingface.co/docs/diffusers/en/training/wuerstchen/#wuerstchen | #wuerstchen | .md | 26_1 |
The training scripts provides many parameters to help you customize your training run. All of the parameters and their descriptions are found in the [`parse_args()`](https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4da4911dfd655ee/examples/wuerstchen/text_to_image/train_text_to_image_prior.py#L192... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/wuerstchen.md | https://huggingface.co/docs/diffusers/en/training/wuerstchen/#script-parameters | #script-parameters | .md | 26_2 |
The training script is also similar to the [Text-to-image](text2image#training-script) training guide, but it's been modified to support Wuerstchen. This guide focuses on the code that is unique to the Wuerstchen training script.
The [`main()`](https://github.com/huggingface/diffusers/blob/6e68c71503682c8693cb5b06a4d... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/wuerstchen.md | https://huggingface.co/docs/diffusers/en/training/wuerstchen/#training-script | #training-script | .md | 26_3 |
Once youโve made all your changes or youโre okay with the default configuration, youโre ready to launch the training script! ๐
Set the `DATASET_NAME` environment variable to the dataset name from the Hub. This guide uses the [Naruto BLIP captions](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions) data... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/wuerstchen.md | https://huggingface.co/docs/diffusers/en/training/wuerstchen/#launch-the-script | #launch-the-script | .md | 26_4 |
Congratulations on training a Wuerstchen model! To learn more about how to use your new model, the following may be helpful:
- Take a look at the [Wuerstchen](../api/pipelines/wuerstchen#text-to-image-generation) API documentation to learn more about how to use the pipeline for text-to-image generation and its limita... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/wuerstchen.md | https://huggingface.co/docs/diffusers/en/training/wuerstchen/#next-steps | #next-steps | .md | 26_5 |
There are many datasets on the [Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) to train a model on, but if you can't find one you're interested in or want to use your own, you can create a dataset with the ๐ค [Datasets](https://huggingface.co/docs/datasets) library. T... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/create_dataset.md | https://huggingface.co/docs/diffusers/en/training/create_dataset/#create-a-dataset-for-training | #create-a-dataset-for-training | .md | 27_0 |
For unconditional generation, you can provide your own dataset as a folder of images. The training script uses the [`ImageFolder`](https://huggingface.co/docs/datasets/en/image_dataset#imagefolder) builder from ๐ค Datasets to automatically build a dataset from the folder. Your directory structure should look like:
``... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/create_dataset.md | https://huggingface.co/docs/diffusers/en/training/create_dataset/#provide-a-dataset-as-a-folder | #provide-a-dataset-as-a-folder | .md | 27_1 |
<Tip>
๐ก For more details and context about creating and uploading a dataset to the Hub, take a look at the [Image search with ๐ค Datasets](https://huggingface.co/blog/image-search-datasets) post.
</Tip>
Start by creating a dataset with the [`ImageFolder`](https://huggingface.co/docs/datasets/image_load#imagefold... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/create_dataset.md | https://huggingface.co/docs/diffusers/en/training/create_dataset/#upload-your-data-to-the-hub | #upload-your-data-to-the-hub | .md | 27_2 |
Now that you've created a dataset, you can plug it into the `train_data_dir` (if your dataset is local) or `dataset_name` (if your dataset is on the Hub) arguments of a training script.
For your next steps, feel free to try and use your dataset to train a model for [unconditional generation](unconditional_training) o... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/create_dataset.md | https://huggingface.co/docs/diffusers/en/training/create_dataset/#next-steps | #next-steps | .md | 27_3 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/ | .md | 28_0 | |
<Tip warning={true}>
This script is experimental, and it's easy to overfit and run into issues like catastrophic forgetting. Try exploring different hyperparameters to get the best results on your dataset.
</Tip>
[Stable Diffusion XL (SDXL)](https://hf.co/papers/2307.01952) is a larger and more powerful iteration... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/#stable-diffusion-xl | #stable-diffusion-xl | .md | 28_1 |
<Tip>
The following sections highlight parts of the training script that are important for understanding how to modify it, but it doesn't cover every aspect of the script in detail. If you're interested in learning more, feel free to read through the [script](https://github.com/huggingface/diffusers/blob/main/example... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/#script-parameters | #script-parameters | .md | 28_2 |
The [Min-SNR](https://huggingface.co/papers/2303.09556) weighting strategy can help with training by rebalancing the loss to achieve faster convergence. The training script supports predicting either `epsilon` (noise) or `v_prediction`, but Min-SNR is compatible with both prediction types. This weighting strategy is on... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/#min-snr-weighting | #min-snr-weighting | .md | 28_3 |
The training script is also similar to the [Text-to-image](text2image#training-script) training guide, but it's been modified to support SDXL training. This guide will focus on the code that is unique to the SDXL training script.
It starts by creating functions to [tokenize the prompts](https://github.com/huggingface... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/#training-script | #training-script | .md | 28_4 |
Once youโve made all your changes or youโre okay with the default configuration, youโre ready to launch the training script! ๐
Letโs train on the [Naruto BLIP captions](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions) dataset to generate your own Naruto characters. Set the environment variables `MODE... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/#launch-the-script | #launch-the-script | .md | 28_5 |
Congratulations on training a SDXL model! To learn more about how to use your new model, the following guides may be helpful:
- Read the [Stable Diffusion XL](../using-diffusers/sdxl) guide to learn how to use it for a variety of different tasks (text-to-image, image-to-image, inpainting), how to use it's refiner mod... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/sdxl.md | https://huggingface.co/docs/diffusers/en/training/sdxl/#next-steps | #next-steps | .md | 28_6 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/unconditional_training.md | https://huggingface.co/docs/diffusers/en/training/unconditional_training/ | .md | 29_0 | |
Unconditional image generation models are not conditioned on text or images during training. It only generates images that resemble its training data distribution.
This guide will explore the [train_unconditional.py](https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/train_unco... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/unconditional_training.md | https://huggingface.co/docs/diffusers/en/training/unconditional_training/#unconditional-image-generation | #unconditional-image-generation | .md | 29_1 |
<Tip>
The following sections highlight parts of the training script that are important for understanding how to modify it, but it doesn't cover every aspect of the script in detail. If you're interested in learning more, feel free to read through the [script](https://github.com/huggingface/diffusers/blob/main/example... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/unconditional_training.md | https://huggingface.co/docs/diffusers/en/training/unconditional_training/#script-parameters | #script-parameters | .md | 29_2 |
The code for preprocessing the dataset and the training loop is found in the [`main()`](https://github.com/huggingface/diffusers/blob/096f84b05f9514fae9f185cbec0a4d38fbad9919/examples/unconditional_image_generation/train_unconditional.py#L275) function. If you need to adapt the training script, this is where you'll nee... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/unconditional_training.md | https://huggingface.co/docs/diffusers/en/training/unconditional_training/#training-script | #training-script | .md | 29_3 |
Once you've made all your changes or you're okay with the default configuration, you're ready to launch the training script! ๐
<Tip warning={true}>
A full training run takes 2 hours on 4xV100 GPUs.
</Tip>
<hfoptions id="launchtraining">
<hfoption id="single GPU">
```bash
accelerate launch train_unconditional... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/unconditional_training.md | https://huggingface.co/docs/diffusers/en/training/unconditional_training/#launch-the-script | #launch-the-script | .md | 29_4 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/lora.md | https://huggingface.co/docs/diffusers/en/training/lora/ | .md | 30_0 | |
<Tip warning={true}>
This is experimental and the API may change in the future.
</Tip>
[LoRA (Low-Rank Adaptation of Large Language Models)](https://hf.co/papers/2106.09685) is a popular and lightweight training technique that significantly reduces the number of trainable parameters. It works by inserting a small... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/lora.md | https://huggingface.co/docs/diffusers/en/training/lora/#lora | #lora | .md | 30_1 |
The training script has many parameters to help you customize your training run. All of the parameters and their descriptions are found in the [`parse_args()`](https://github.com/huggingface/diffusers/blob/dd9a5caf61f04d11c0fa9f3947b69ab0010c9a0f/examples/text_to_image/train_text_to_image_lora.py#L85) function. Default... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/lora.md | https://huggingface.co/docs/diffusers/en/training/lora/#script-parameters | #script-parameters | .md | 30_2 |
The dataset preprocessing code and training loop are found in the [`main()`](https://github.com/huggingface/diffusers/blob/dd9a5caf61f04d11c0fa9f3947b69ab0010c9a0f/examples/text_to_image/train_text_to_image_lora.py#L371) function, and if you need to adapt the training script, this is where you'll make your changes.
A... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/lora.md | https://huggingface.co/docs/diffusers/en/training/lora/#training-script | #training-script | .md | 30_3 |
Once you've made all your changes or you're okay with the default configuration, you're ready to launch the training script! ๐
Let's train on the [Naruto BLIP captions](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions) dataset to generate your own Naruto characters. Set the environment variables `MODE... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/lora.md | https://huggingface.co/docs/diffusers/en/training/lora/#launch-the-script | #launch-the-script | .md | 30_4 |
Congratulations on training a new model with LoRA! To learn more about how to use your new model, the following guides may be helpful:
- Learn how to [load different LoRA formats](../using-diffusers/loading_adapters#LoRA) trained using community trainers like Kohya and TheLastBen.
- Learn how to use and [combine mult... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/lora.md | https://huggingface.co/docs/diffusers/en/training/lora/#next-steps | #next-steps | .md | 30_5 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/ | .md | 31_0 | |
[ControlNet](https://hf.co/papers/2302.05543) models are adapters trained on top of another pretrained model. It allows for a greater degree of control over image generation by conditioning the model with an additional input image. The input image can be a canny edge, depth map, human pose, and many more.
If you're t... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#controlnet | #controlnet | .md | 31_1 |
The training script provides many parameters to help you customize your training run. All of the parameters and their descriptions are found in the [`parse_args()`](https://github.com/huggingface/diffusers/blob/64603389da01082055a901f2883c4810d1144edb/examples/controlnet/train_controlnet.py#L231) function. This functio... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#script-parameters | #script-parameters | .md | 31_2 |
The [Min-SNR](https://huggingface.co/papers/2303.09556) weighting strategy can help with training by rebalancing the loss to achieve faster convergence. The training script supports predicting `epsilon` (noise) or `v_prediction`, but Min-SNR is compatible with both prediction types. This weighting strategy is only supp... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#min-snr-weighting | #min-snr-weighting | .md | 31_3 |
As with the script parameters, a general walkthrough of the training script is provided in the [Text-to-image](text2image#training-script) training guide. Instead, this guide takes a look at the relevant parts of the ControlNet script.
The training script has a [`make_train_dataset`](https://github.com/huggingface/di... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#training-script | #training-script | .md | 31_4 |
Now you're ready to launch the training script! ๐
This guide uses the [fusing/fill50k](https://huggingface.co/datasets/fusing/fill50k) dataset, but remember, you can create and use your own dataset if you want (see the [Create a dataset for training](create_dataset) guide).
Set the environment variable `MODEL_NAME... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#launch-the-script | #launch-the-script | .md | 31_5 |
Stable Diffusion XL (SDXL) is a powerful text-to-image model that generates high-resolution images, and it adds a second text-encoder to its architecture. Use the [`train_controlnet_sdxl.py`](https://github.com/huggingface/diffusers/blob/main/examples/controlnet/train_controlnet_sdxl.py) script to train a ControlNet ad... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#stable-diffusion-xl | #stable-diffusion-xl | .md | 31_6 |
Congratulations on training your own ControlNet! To learn more about how to use your new model, the following guides may be helpful:
- Learn how to [use a ControlNet](../using-diffusers/controlnet) for inference on a variety of tasks. | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/controlnet.md | https://huggingface.co/docs/diffusers/en/training/controlnet/#next-steps | #next-steps | .md | 31_7 |
<!--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... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text_inversion.md | https://huggingface.co/docs/diffusers/en/training/text_inversion/ | .md | 32_0 | |
[Textual Inversion](https://hf.co/papers/2208.01618) is a training technique for personalizing image generation models with just a few example images of what you want it to learn. This technique works by learning and updating the text embeddings (the new embeddings are tied to a special word you must use in the prompt)... | /Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/training/text_inversion.md | https://huggingface.co/docs/diffusers/en/training/text_inversion/#textual-inversion | #textual-inversion | .md | 32_1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.