diff --git a/docs/source/en/_toctree.yml b/docs/source/en/_toctree.yml index f05667986f11..f2801a0cd6a6 100644 --- a/docs/source/en/_toctree.yml +++ b/docs/source/en/_toctree.yml @@ -5,73 +5,71 @@ title: Installation - local: quicktour title: Quickstart - - local: stable_diffusion - title: Basic performance + - local: using-diffusers/cli + title: Command line interface title: Get started -- isExpanded: false - sections: - - local: using-diffusers/loading - title: DiffusionPipeline - - local: tutorials/autopipeline - title: AutoPipeline - - local: using-diffusers/custom_pipeline_overview - title: Community pipelines and components - - local: using-diffusers/callback - title: Pipeline callbacks - - local: using-diffusers/reusing_seeds - title: Reproducibility - - local: using-diffusers/schedulers - title: Schedulers - - local: using-diffusers/guiders - title: Guiders - - local: using-diffusers/automodel - title: AutoModel - - local: using-diffusers/other-formats - title: Model formats - - local: using-diffusers/push_to_hub - title: Sharing pipelines and models - title: Pipelines -- isExpanded: false - sections: - - local: tutorials/using_peft_for_inference - title: LoRA - - local: using-diffusers/ip_adapter - title: IP-Adapter - - local: using-diffusers/controlnet - title: ControlNet - - local: using-diffusers/t2i_adapter - title: T2I-Adapter - - local: using-diffusers/dreambooth - title: DreamBooth - - local: using-diffusers/textual_inversion_inference - title: Textual inversion - title: Adapters -- isExpanded: false +- isExpanded: true sections: - - local: using-diffusers/weighted_prompts - title: Prompting - - local: using-diffusers/create_a_server - title: Create a server - - local: using-diffusers/batched_inference - title: Batch inference - - local: training/distributed_inference - title: Distributed inference - - local: hybrid_inference/overview - title: Remote inference + - isExpanded: false + sections: + - local: using-diffusers/weighted_prompts + title: Prompting + - local: using-diffusers/loading + title: DiffusionPipeline + - local: tutorials/autopipeline + title: AutoPipeline + - local: using-diffusers/custom_pipeline_overview + title: Community pipelines and components + - local: using-diffusers/callback + title: Pipeline callbacks + - local: using-diffusers/reusing_seeds + title: Reproducibility + - local: using-diffusers/schedulers + title: Schedulers + - local: using-diffusers/guiders + title: Guiders + - local: using-diffusers/automodel + title: AutoModel + - local: using-diffusers/other-formats + title: Model formats + - local: using-diffusers/push_to_hub + title: Sharing pipelines and models + title: Using diffusion pipelines + - isExpanded: false + sections: + - local: tutorials/using_peft_for_inference + title: LoRA + - local: using-diffusers/ip_adapter + title: IP-Adapter + - local: using-diffusers/controlnet + title: ControlNet + - local: using-diffusers/t2i_adapter + title: T2I-Adapter + - local: using-diffusers/dreambooth + title: DreamBooth + - local: using-diffusers/textual_inversion_inference + title: Textual inversion + title: Adapters and personalization title: Inference -- isExpanded: false +- isExpanded: true sections: - - local: optimization/fp16 - title: Accelerate inference - - local: optimization/cache - title: Caching - - local: optimization/attention_backends - title: Attention backends - - local: optimization/memory - title: Reduce memory usage - - local: optimization/speed-memory-optims - title: Compiling and offloading quantized models - - sections: + - local: stable_diffusion + title: Basic performance + - isExpanded: false + sections: + - local: optimization/fp16 + title: Accelerate inference + - local: optimization/cache + title: Caching + - local: optimization/attention_backends + title: Attention backends + - local: optimization/memory + title: Reduce memory usage + - local: optimization/speed-memory-optims + title: Compiling and offloading quantized models + title: Inference + - isExpanded: false + sections: - local: optimization/pruna title: Pruna - local: optimization/xformers @@ -90,8 +88,55 @@ title: ParaAttention - local: using-diffusers/image_quality title: FreeU - title: Community optimizations - title: Inference optimization + title: Community methods + - isExpanded: false + sections: + - local: quantization/overview + title: Getting started + - local: quantization/bitsandbytes + title: bitsandbytes + - local: quantization/gguf + title: gguf + - local: quantization/nunchaku + title: Nunchaku Lite + - local: quantization/torchao + title: torchao + - local: quantization/quanto + title: quanto + - local: quantization/modelopt + title: NVIDIA ModelOpt + - local: quantization/autoround + title: AutoRound + - local: quantization/sdnq + title: SDNQ + title: Quantization + - isExpanded: false + sections: + - local: optimization/onnx + title: ONNX + - local: optimization/open_vino + title: OpenVINO + - local: optimization/coreml + title: Core ML + - local: optimization/mps + title: Metal Performance Shaders (MPS) + - local: optimization/habana + title: Intel Gaudi + - local: optimization/neuron + title: AWS Neuron + title: Hardware-specific acceleration + - isExpanded: false + sections: + - local: using-diffusers/create_a_server + title: Create a server + - local: using-diffusers/batched_inference + title: Batch inference + - local: training/distributed_inference + title: Distributed inference + - local: hybrid_inference/overview + title: Remote inference + title: Serving and scaling + title: Optimize and scale - isExpanded: false sections: - local: modular_diffusers/overview @@ -129,7 +174,8 @@ title: Adapt a model to a new task - local: tutorials/basic_training title: Train a diffusion model - - sections: + - isExpanded: false + sections: - local: training/unconditional_training title: Unconditional image generation - local: training/text2image @@ -146,8 +192,9 @@ title: InstructPix2Pix - local: training/cogvideox title: CogVideoX - title: Models - - sections: + title: Model recipes + - isExpanded: false + sections: - local: training/text_inversion title: Textual Inversion - local: training/dreambooth @@ -160,49 +207,14 @@ title: Latent Consistency Distillation - local: training/ddpo title: Reinforcement learning training with DDPO - title: Methods + title: Training methods - local: training/nemo_automodel title: NeMo Automodel - title: Training -- isExpanded: false - sections: - - local: quantization/overview - title: Getting started - - local: quantization/bitsandbytes - title: bitsandbytes - - local: quantization/gguf - title: gguf - - local: quantization/nunchaku - title: Nunchaku Lite - - local: quantization/torchao - title: torchao - - local: quantization/quanto - title: quanto - - local: quantization/modelopt - title: NVIDIA ModelOpt - - local: quantization/autoround - title: AutoRound - - local: quantization/sdnq - title: SDNQ - title: Quantization + title: Train and fine-tune - isExpanded: false sections: - - local: optimization/onnx - title: ONNX - - local: optimization/open_vino - title: OpenVINO - - local: optimization/coreml - title: Core ML - - local: optimization/mps - title: Metal Performance Shaders (MPS) - - local: optimization/habana - title: Intel Gaudi - - local: optimization/neuron - title: AWS Neuron - title: Model accelerators and hardware -- isExpanded: false - sections: - - sections: + - isExpanded: false + sections: - local: using-diffusers/unconditional_image_generation title: Unconditional image generation - local: using-diffusers/conditional_image_generation @@ -217,22 +229,26 @@ title: Video generation - local: using-diffusers/depth2img title: Depth-to-image - title: Task recipes - - local: using-diffusers/write_own_pipeline - title: Understanding pipelines, models and schedulers - - local: using-diffusers/cli - title: Command line interface + title: Recipes + - isExpanded: false + sections: + - local: conceptual/philosophy + title: Diffusers philosophy + - local: using-diffusers/write_own_pipeline + title: Understanding pipelines, models and schedulers + - local: using-diffusers/controlling_generation + title: Controlled generation + title: Concepts and background - local: community_projects title: Projects built with Diffusers - - local: conceptual/philosophy - title: Philosophy - - local: using-diffusers/controlling_generation - title: Controlled generation + title: Resources +- isExpanded: false + sections: - local: conceptual/contribution - title: How to contribute? + title: How to contribute - local: conceptual/ethical_guidelines title: Diffusers' Ethical Guidelines - title: Resources + title: Contribute - isExpanded: false sections: - sections: diff --git a/docs/source/en/training/dreambooth.md b/docs/source/en/training/dreambooth.md index a28cf17ac837..56267f0d9e00 100644 --- a/docs/source/en/training/dreambooth.md +++ b/docs/source/en/training/dreambooth.md @@ -14,6 +14,8 @@ specific language governing permissions and limitations under the License. [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. +To load a trained checkpoint for inference, see [Load a DreamBooth adapter for inference](../using-diffusers/dreambooth). + If you're training on a GPU with limited vRAM, you should try enabling the `gradient_checkpointing` and `mixed_precision` parameters in the training command. You can also reduce your memory footprint by using memory-efficient attention with [xFormers](../optimization/xformers). This guide will explore the [train_dreambooth.py](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth.py) script to help you become more familiar with it, and how you can adapt it for your own use-case. diff --git a/docs/source/en/training/text_inversion.md b/docs/source/en/training/text_inversion.md index 913230d4463e..1cf15b05b956 100644 --- a/docs/source/en/training/text_inversion.md +++ b/docs/source/en/training/text_inversion.md @@ -14,6 +14,8 @@ specific language governing permissions and limitations under the License. [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) to match the example images you provide. +For inference with trained embeddings, see [Textual inversion inference](../using-diffusers/textual_inversion_inference). + If you're training on a GPU with limited vRAM, you should try enabling the `gradient_checkpointing` and `mixed_precision` parameters in the training command. You can also reduce your memory footprint by using memory-efficient attention with [xFormers](../optimization/xformers). This guide will explore the [textual_inversion.py](https://github.com/huggingface/diffusers/blob/main/examples/textual_inversion/textual_inversion.py) script to help you become more familiar with it, and how you can adapt it for your own use-case. diff --git a/docs/source/en/using-diffusers/dreambooth.md b/docs/source/en/using-diffusers/dreambooth.md index 13940b8d1e98..41988ac1074a 100644 --- a/docs/source/en/using-diffusers/dreambooth.md +++ b/docs/source/en/using-diffusers/dreambooth.md @@ -16,6 +16,8 @@ specific language governing permissions and limitations under the License. DreamBooth checkpoints are typically a few GBs in size because it contains the full model weights. +To train one, see [Train DreamBooth](../training/dreambooth). + Load the DreamBooth checkpoint with [`~DiffusionPipeline.from_pretrained`] and include the unique identifier in the prompt to activate its generation. ```py diff --git a/docs/source/en/using-diffusers/textual_inversion_inference.md b/docs/source/en/using-diffusers/textual_inversion_inference.md index f2883d87b605..a773295742b4 100644 --- a/docs/source/en/using-diffusers/textual_inversion_inference.md +++ b/docs/source/en/using-diffusers/textual_inversion_inference.md @@ -16,6 +16,8 @@ specific language governing permissions and limitations under the License. Textual Inversion weights are very lightweight and typically only a few KBs because they're only word embeddings. However, this also means the word embeddings need to be loaded after loading a model with [`~DiffusionPipeline.from_pretrained`]. +To train embeddings, see [Train textual inversion](../training/text_inversion). + ```py import torch from diffusers import AutoPipelineForText2Image