MCPcopy Create free account
hub / github.com/Monalissaa/DisenDiff / _transform

Function _transform

clip/clip.py:58–65  ·  view source on GitHub ↗
(n_px)

Source from the content-addressed store, hash-verified

56
57
58def _transform(n_px):
59 return Compose([
60 Resize(n_px, interpolation=Image.BICUBIC),
61 CenterCrop(n_px),
62 lambda image: image.convert("RGB"),
63 ToTensor(),
64 Normalize((0.48145466, 0.4578275, 0.40821073), (0.26862954, 0.26130258, 0.27577711)),
65 ])
66
67
68def available_models() -> List[str]:

Callers 1

loadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected