Skip to content

Commit f6e92ca

Browse files
authored
Update pipeline_flux.py
1 parent 758b1db commit f6e92ca

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/diffusers/pipelines/flux/pipeline_flux.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def __call__(
674674
The prompt or prompts not to guide the image generation to be sent to `tokenizer_2` and
675675
`text_encoder_2`. If not defined, `negative_prompt` is used in all the text-encoders.
676676
true_cfg_scale (`float`, *optional*, defaults to 1.0):
677-
When > 1.0 and a provided `negative_prompt`, enables true classifier-free guidance.
677+
True classifier-free guidance (guidance scale) is enabled when `true_cfg_scale` > 1 and `negative_prompt` is provided.
678678
height (`int`, *optional*, defaults to self.unet.config.sample_size * self.vae_scale_factor):
679679
The height in pixels of the generated image. This is set to 1024 by default for the best results.
680680
width (`int`, *optional*, defaults to self.unet.config.sample_size * self.vae_scale_factor):
@@ -687,15 +687,11 @@ def __call__(
687687
their `set_timesteps` method. If not defined, the default behavior when `num_inference_steps` is passed
688688
will be used.
689689
guidance_scale (`float`, *optional*, defaults to 3.5):
690-
Guidance scale as defined in [Classifier-Free Diffusion
691-
Guidance](https://huggingface.co/papers/2207.12598). `guidance_scale` is defined as `w` of equation 2.
692-
of [Imagen Paper](https://huggingface.co/papers/2205.11487). Guidance scale is enabled by setting
693-
`guidance_scale > 1`. Higher guidance scale encourages to generate images that are closely linked to
694-
the text `prompt`, usually at the expense of lower image quality. In case of Flux, which is a guidance-
695-
distilled model, `guidance_scale > 1` doesn't implement true classifier-free guidance. Specifying
696-
`guidance_scale > 1` just mimics it. In case of Flux, which is a guidance- distilled model,
697-
`guidance_scale > 1` doesn't implement true classifier-free guidance. Specifying `guidance_scale > 1`
698-
just mimics it.
690+
Embedded guiddance scale is enabled by setting `guidance_scale` > 1. Higher `guidance_scale` encourages a model to
691+
generate images more aligned with `prompt` at the expense of lower image quality.
692+
693+
Guidance-distilled models approximates true classifer-free guidance for `guidance_scale` > 1. Refer to the
694+
[paper](https://huggingface.co/papers/2210.03142) to learn more.
699695
num_images_per_prompt (`int`, *optional*, defaults to 1):
700696
The number of images to generate per prompt.
701697
generator (`torch.Generator` or `List[torch.Generator]`, *optional*):

0 commit comments

Comments
 (0)