code: def __init__(
      self,
      unet: UNet2DConditionModel,
      scheduler: Union[DDIMScheduler, DDPMScheduler],
      bit_scale: Optional[float] = 1.0,
  ):
      super().__init__()
      self.bit_scale = bit_scale
      self.scheduler.step = (
          ddim_bit_scheduler_step
          if isinstance(scheduler, DDIMScheduler)
          else ddpm_bit_scheduler_step
      )
  
      self.register_modules(unet=unet, scheduler=scheduler)
  
file_path: llmga/llmga/diffusers/examples/community/bit_diffusion.py
imports: from typing import Optional, Tuple, Union
  import torch
  from einops import rearrange, reduce
  from diffusers import DDIMScheduler, DDPMScheduler, DiffusionPipeline, ImagePipelineOutput, UNet2DConditionModel
  from diffusers.schedulers.scheduling_ddim import DDIMSchedulerOutput
  from diffusers.schedulers.scheduling_ddpm import DDPMSchedulerOutput
label_desc: Use image node_id 1 to create a new BitDiffusion object from inherited base classes: DiffusionPipeline with example: obj = BitDiffusion(unet, scheduler, bit_scale)