MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / sample_log

Method sample_log

cldm/cldm.py:451–456  ·  view source on GitHub ↗
(self, cond, batch_size, ddim, ddim_steps, **kwargs)

Source from the content-addressed store, hash-verified

449
450 @torch.no_grad()
451 def sample_log(self, cond, batch_size, ddim, ddim_steps, **kwargs):
452 ddim_sampler = DDIMSampler(self)
453 b, c, h, w = cond["c_concat"][0].shape
454 shape = (self.channels, h // 8, w // 8)
455 samples, intermediates = ddim_sampler.sample(ddim_steps, batch_size, shape, cond, verbose=False, **kwargs)
456 return samples, intermediates
457
458 def configure_optimizers(self):
459 lr = self.learning_rate

Callers 1

log_imagesMethod · 0.95

Calls 2

sampleMethod · 0.95
DDIMSamplerClass · 0.90

Tested by

no test coverage detected