MCPcopy Create free account
hub / github.com/Zhiyuan-R/Tiger-Diffusion / gen_samples

Method gen_samples

test_generation.py:317–323  ·  view source on GitHub ↗
(self, shape, device, noise_fn=torch.randn, constrain_fn=lambda x, t:x,
                    clip_denoised=False, max_timestep=None,
                    keep_running=False)

Source from the content-addressed store, hash-verified

315 return losses
316
317 def gen_samples(self, shape, device, noise_fn=torch.randn, constrain_fn=lambda x, t:x,
318 clip_denoised=False, max_timestep=None,
319 keep_running=False):
320 return self.diffusion.p_sample_loop(self._denoise, shape=shape, device=device, noise_fn=noise_fn,
321 constrain_fn=constrain_fn,
322 clip_denoised=clip_denoised, max_timestep=max_timestep,
323 keep_running=keep_running)
324
325 def reconstruct(self, x0, t, constrain_fn=lambda x, t:x):
326

Callers 1

generateFunction · 0.45

Calls 1

p_sample_loopMethod · 0.45

Tested by

no test coverage detected