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

Method __call__

sat/sgm/modules/diffusionmodules/sampling.py:350–366  ·  view source on GitHub ↗
(self, denoiser, x, cond, uc=None, num_steps=None, **kwargs)

Source from the content-addressed store, hash-verified

348 return x, denoised
349
350 def __call__(self, denoiser, x, cond, uc=None, num_steps=None, **kwargs):
351 x, s_in, sigmas, num_sigmas, cond, uc = self.prepare_sampling_loop(x, cond, uc, num_steps)
352
353 old_denoised = None
354 for i in self.get_sigma_gen(num_sigmas):
355 x, old_denoised = self.sampler_step(
356 old_denoised,
357 None if i == 0 else s_in * sigmas[i - 1],
358 s_in * sigmas[i],
359 s_in * sigmas[i + 1],
360 denoiser,
361 x,
362 cond,
363 uc=uc,
364 )
365
366 return x
367
368
369class SDEDPMPP2MSampler(BaseDiffusionSampler):

Callers

nothing calls this directly

Calls 3

sampler_stepMethod · 0.95
get_sigma_genMethod · 0.80
prepare_sampling_loopMethod · 0.45

Tested by

no test coverage detected