MCPcopy Create free account
hub / github.com/ChenWu98/cycle-diffusion / convsample_ddim_forward

Function convsample_ddim_forward

model/gan_wrapper/latentdiff_wrapper.py:95–101  ·  view source on GitHub ↗
(model, steps, shape, x0)

Source from the content-addressed store, hash-verified

93
94
95def convsample_ddim_forward(model, steps, shape, x0):
96 with model.ema_scope("Plotting"): # TODO: important
97 ddim = DDIMSampler(model)
98 bs = shape[0]
99 shape = shape[1:]
100 samples, intermediates = ddim.sample_forward(steps, batch_size=bs, shape=shape, eta=0, verbose=True, x0=x0) # TODO: verbose.
101 return samples, intermediates
102
103
104def convsample_ddim_forward_conditional(model, steps, shape, x0, scale, class_label):

Callers 1

encodeMethod · 0.85

Calls 2

DDIMSamplerClass · 0.50
ema_scopeMethod · 0.45

Tested by

no test coverage detected