Skip to content

Commit e6ffde2

Browse files
yiyixuxua-r-r-o-w
andauthored
Apply suggestions from code review
Co-authored-by: Aryan <[email protected]>
1 parent 04171c7 commit e6ffde2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/source/en/modular_diffusers/getting_started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,9 @@ ComponentSpec(
692692

693693
### Customizing Guidance Techniques
694694

695-
Guiders are guidance techniques that can be applied during the denoising process to improve generation quality, control, and adherence to prompts. They work by modifying the noise predictions or model behavior to steer the generation process in desired directions. In diffusers, guiders are implemented as subclasses of `BaseGuidance` and can be easily integrated into modular pipelines, providing a flexible way to enhance generation quality without modifying the underlying diffusion models.
695+
Guiders are implementations of different [classifier-free guidance](https://huggingface.co/papers/2207.12598) techniques that can be applied during the denoising process to improve generation quality, control, and adherence to prompts. They work by steering the model predictions towards desired directions and away from undesired directions. In diffusers, guiders are implemented as subclasses of `BaseGuidance`. They can easily be integrated into modular pipelines and provide a flexible way to enhance generation quality without modifying the underlying diffusion models.
696696

697-
**ClassifierFreeGuidance (CFG)** is the first and most common guidance technique, used in all our standard pipelines. But we offer many more guidance techniques beyond CFG, including **PerturbedAttentionGuidance (PAG)**, **SkipLayerGuidance (SLG)**, **SmoothedEnergyGuidance (SEG)**, and others that can provide even better results for specific use cases.
697+
**ClassifierFreeGuidance (CFG)** is the first and most common guidance technique, used in all our standard pipelines. We also offer many other guidance techniques from the latest research in this area - **PerturbedAttentionGuidance (PAG)**, **SkipLayerGuidance (SLG)**, **SmoothedEnergyGuidance (SEG)**, and others that can provide better results for specific use cases.
698698

699699
This section demonstrates how to use guiders using the component updating methods we just learned. Since `BaseGuidance` components are stateless (similar to schedulers), they are typically created with default configurations during pipeline initialization using `default_creation_method='from_config'`. This means they don't require loading specs from the repository - you won't see guider listed in `modular_model_index.json` files.
700700

@@ -756,7 +756,7 @@ ClassifierFreeGuidance {
756756

757757
#### Switch to a Different Guider Type
758758

759-
Since guiders are `from_config` components (ConfigMixin objects), you can pass guider objects directly to switch between different guidance techniques:
759+
Switching between guidance techniques is as simple as passing a guider object of that technique:
760760

761761
```py
762762
from diffusers import LayerSkipConfig, PerturbedAttentionGuidance
@@ -776,7 +776,7 @@ ModularPipeline.update_components: adding guider with new type: PerturbedAttenti
776776
<Tip>
777777

778778
💡 **Component Loading Methods**:
779-
- For `from_config` components (like guiders, schedulers): You can pass the object directly OR pass a ComponentSpec directly (which calls `create()` under the hood)
779+
- For `from_config` components (like guiders, schedulers): You can pass an object of required type OR pass a ComponentSpec directly (which calls `create()` under the hood)
780780
- For `from_pretrained` components (like models): You must use ComponentSpec to ensure proper tagging and loading
781781

782782
</Tip>
@@ -915,7 +915,7 @@ Of course, you can also directly modify the `modular_model_index.json` to add a
915915
- **SmoothedEnergyGuidance (SEG)**: Helps with energy distribution smoothing
916916
- **AdaptiveProjectedGuidance (APG)**: Adaptive guidance that projects predictions for better quality
917917

918-
Experiment with different techniques and parameters to find what works best for your specific use case!
918+
Experiment with different techniques and parameters to find what works best for your specific use case! Additionally, you can write your own guider implementations, for example, CFG Zero* combined with Skip Layer Guidance, and they should be compatible out-of-the-box with modular diffusers!
919919

920920
</Tip>
921921

0 commit comments

Comments
 (0)