MCPcopy Create free account
hub / github.com/CompVis/diff2flow / __call__

Method __call__

diff2flow/dataset/image_preprocessing.py:38–42  ·  view source on GitHub ↗
(self, sample)

Source from the content-addressed store, hash-verified

36 self.shape = (latent_dim, resolution // 8, resolution // 8)
37
38 def __call__(self, sample):
39 assert self.key not in sample, f"Key {self.key} already exists in sample"
40 noise = torch.randn(self.shape)
41 sample[self.key] = noise
42 return sample

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected