docstr: Enables the FreeU mechanism as in https://arxiv.org/abs/2309.11497.
  
  The suffixes after the scaling factors represent the stages where they are being applied.
  
  Please refer to the [official repository](https://github.com/ChenyangSi/FreeU) for combinations of the values
  that are known to work well for different pipelines such as Stable Diffusion v1, v2, and Stable Diffusion XL.
  
  Args:
      s1 (`float`):
          Scaling factor for stage 1 to attenuate the contributions of the skip features. This is done to
          mitigate "oversmoothing effect" in the enhanced denoising process.
      s2 (`float`):
          Scaling factor for stage 2 to attenuate the contributions of the skip features. This is done to
          mitigate "oversmoothing effect" in the enhanced denoising process.
      b1 (`float`): Scaling factor for stage 1 to amplify the contributions of backbone features.
      b2 (`float`): Scaling factor for stage 2 to amplify the contributions of backbone features.
code: def enable_freeu(self, s1: float, s2: float, b1: float, b2: float):
      r"""Enables the FreeU mechanism as in https://arxiv.org/abs/2309.11497.
  
      The suffixes after the scaling factors represent the stages where they are being applied.
  
      Please refer to the [official repository](https://github.com/ChenyangSi/FreeU) for combinations of the values
      that are known to work well for different pipelines such as Stable Diffusion v1, v2, and Stable Diffusion XL.
  
      Args:
          s1 (`float`):
              Scaling factor for stage 1 to attenuate the contributions of the skip features. This is done to
              mitigate "oversmoothing effect" in the enhanced denoising process.
          s2 (`float`):
              Scaling factor for stage 2 to attenuate the contributions of the skip features. This is done to
              mitigate "oversmoothing effect" in the enhanced denoising process.
          b1 (`float`): Scaling factor for stage 1 to amplify the contributions of backbone features.
          b2 (`float`): Scaling factor for stage 2 to amplify the contributions of backbone features.
      """
      if not hasattr(self, "unet"):
          raise ValueError(
              "The pipeline must have `unet` for using FreeU."
          )
      self.unet.enable_freeu(s1=s1, s2=s2, b1=b1, b2=b2)
  
imports: import inspect
  from typing import Any, Dict, List, Optional, Union
  import torch
  import torch.nn
  from transformers import AutoModel, AutoTokenizer, CLIPImageProcessor
  from diffusers import DiffusionPipeline
  from diffusers.image_processor import VaeImageProcessor
  from diffusers.loaders import LoraLoaderMixin
  from diffusers.models import AutoencoderKL, UNet2DConditionModel
  from diffusers.models.lora import adjust_lora_scale_text_encoder
  from diffusers.pipelines.stable_diffusion.pipeline_output import StableDiffusionPipelineOutput
  from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
  from diffusers.schedulers import KarrasDiffusionSchedulers
  from diffusers.utils import USE_PEFT_BACKEND, logging, scale_lora_layers, unscale_lora_layers
  from diffusers.utils.torch_utils import randn_tensor
label_desc: Use image node_id 13 for calling the GlueGenStableDiffusionPipeline obj's underlying member method code with example usage: obj.enable_freeu(s1, s2, b1, b2) without return types