MCPcopy
hub / github.com/zai-org/CogVideo / __call__

Method __call__

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

Source from the content-addressed store, hash-verified

106 return x
107
108 def __call__(self, denoiser, x, cond, uc=None, num_steps=None):
109 x, s_in, sigmas, num_sigmas, cond, uc = self.prepare_sampling_loop(x, cond, uc, num_steps)
110
111 for i in self.get_sigma_gen(num_sigmas):
112 gamma = (
113 min(self.s_churn / (num_sigmas - 1), 2**0.5 - 1) if self.s_tmin <= sigmas[i] <= self.s_tmax else 0.0
114 )
115 x = self.sampler_step(
116 s_in * sigmas[i],
117 s_in * sigmas[i + 1],
118 denoiser,
119 x,
120 cond,
121 uc,
122 gamma,
123 )
124
125 return x
126
127
128class DDIMSampler(SingleStepDiffusionSampler):

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