From abc5abfe1252f5f1662b3b72d565294d529443c4 Mon Sep 17 00:00:00 2001 From: sayakpaul Date: Wed, 18 Dec 2024 10:06:48 +0530 Subject: [PATCH] fix: torchao example. --- docs/source/en/quantization/torchao.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/en/quantization/torchao.md b/docs/source/en/quantization/torchao.md index bd5c7697a0f7..1f9f99a79a3b 100644 --- a/docs/source/en/quantization/torchao.md +++ b/docs/source/en/quantization/torchao.md @@ -27,7 +27,7 @@ The example below only quantizes the weights to int8. ```python from diffusers import FluxPipeline, FluxTransformer2DModel, TorchAoConfig -model_id = "black-forest-labs/Flux.1-Dev" +model_id = "black-forest-labs/FLUX.1-dev" dtype = torch.bfloat16 quantization_config = TorchAoConfig("int8wo") @@ -45,7 +45,9 @@ pipe = FluxPipeline.from_pretrained( pipe.to("cuda") prompt = "A cat holding a sign that says hello world" -image = pipe(prompt, num_inference_steps=28, guidance_scale=0.0).images[0] +image = pipe( + prompt, num_inference_steps=50, guidance_scale=4.5, max_sequence_length=512 +).images[0] image.save("output.png") ```