Skip to content

Commit dea2745

Browse files
committed
up
1 parent 909e715 commit dea2745

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/source/en/quantization/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Initialize [`~quantizers.PipelineQuantizationConfig`] with the following paramet
3434
> [!TIP]
3535
> These `quant_kwargs` arguments are different for each backend. Refer to the [Quantization API](../api/quantization) docs to view the arguments for each backend.
3636
37-
- `components_to_quantize` specifies which components of the pipeline to quantize. Typically, you should quantize the most compute intensive components like the transformer. The text encoder is another component to consider quantizing if a pipeline has more than one such as [`FluxPipeline`]. The example below quantizes the T5 text encoder in [`FluxPipeline`] while keeping the CLIP model intact.
37+
- `components_to_quantize` specifies which component(s) of the pipeline to quantize. Typically, you should quantize the most compute intensive components like the transformer. The text encoder is another component to consider quantizing if a pipeline has more than one such as [`FluxPipeline`]. The example below quantizes the T5 text encoder in [`FluxPipeline`] while keeping the CLIP model intact.
3838

3939
The example below loads the bitsandbytes backend with the following arguments from [`~quantizers.quantization_config.BitsAndBytesConfig`], `load_in_4bit`, `bnb_4bit_quant_type`, and `bnb_4bit_compute_dtype`.
4040

@@ -62,6 +62,8 @@ pipe = DiffusionPipeline.from_pretrained(
6262
image = pipe("photo of a cute dog").images[0]
6363
```
6464

65+
`components_to_quantize` doesn't have to be a list. You can also pass: `components_to_quantize="transformers"`.
66+
6567
### Advanced quantization
6668

6769
The `quant_mapping` argument provides more options for how to quantize each individual component in a pipeline, like combining different quantization backends.

0 commit comments

Comments
 (0)