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

Method forward

diff2flow/dataset/image_preprocessing.py:11–16  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

9 self.size = size
10
11 def forward(self, x):
12 h, w = x.shape[-2:]
13 min_size = min(h, w)
14 crop = T.functional.center_crop(x, min_size)
15 x = T.functional.resize(crop, self.size, antialias=True)
16 return x
17
18
19class RescaleDiffusersLatent:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected