MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __call__

Method __call__

sat/sgm/modules/diffusionmodules/sampling.py:604–623  ·  view source on GitHub ↗
(self, denoiser, x, cond, uc=None, num_steps=None, scale=None, scale_emb=None)

Source from the content-addressed store, hash-verified

602 return x
603
604 def __call__(self, denoiser, x, cond, uc=None, num_steps=None, scale=None, scale_emb=None):
605 x, s_in, alpha_cumprod_sqrt, num_sigmas, cond, uc, timesteps = self.prepare_sampling_loop(
606 x, cond, uc, num_steps
607 )
608
609 for i in self.get_sigma_gen(num_sigmas):
610 x = self.sampler_step(
611 s_in * alpha_cumprod_sqrt[i],
612 s_in * alpha_cumprod_sqrt[i + 1],
613 denoiser,
614 x,
615 cond,
616 uc,
617 idx=self.num_steps - i, # * What's the use of idx, difference between timestep
618 timestep=timesteps[-(i + 1)],
619 scale=scale,
620 scale_emb=scale_emb,
621 )
622
623 return x
624
625
626class VPSDEDPMPP2MSampler(VideoDDIMSampler):

Callers

nothing calls this directly

Calls 3

prepare_sampling_loopMethod · 0.95
sampler_stepMethod · 0.95
get_sigma_genMethod · 0.80

Tested by

no test coverage detected