MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / __init__

Method __init__

diffusers/examples/community/bit_diffusion.py:214–226  ·  view source on GitHub ↗
(
        self,
        unet: UNet2DConditionModel,
        scheduler: Union[DDIMScheduler, DDPMScheduler],
        bit_scale: Optional[float] = 1.0,
    )

Source from the content-addressed store, hash-verified

212
213class BitDiffusion(DiffusionPipeline):
214 def __init__(
215 self,
216 unet: UNet2DConditionModel,
217 scheduler: Union[DDIMScheduler, DDPMScheduler],
218 bit_scale: Optional[float] = 1.0,
219 ):
220 super().__init__()
221 self.bit_scale = bit_scale
222 self.scheduler.step = (
223 ddim_bit_scheduler_step if isinstance(scheduler, DDIMScheduler) else ddpm_bit_scheduler_step
224 )
225
226 self.register_modules(unet=unet, scheduler=scheduler)
227
228 @torch.no_grad()
229 def __call__(

Callers

nothing calls this directly

Calls 1

register_modulesMethod · 0.45

Tested by

no test coverage detected