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

Method __init__

diff2flow/dataset/image_preprocessing.py:33–36  ·  view source on GitHub ↗
(self, key, resolution: int = 512, latent_dim: int = 4)

Source from the content-addressed store, hash-verified

31
32class AddNoiseLatent:
33 def __init__(self, key, resolution: int = 512, latent_dim: int = 4):
34 self.key = key
35 assert resolution % 8 == 0, "Resolution must be divisible by 8"
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"

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected