We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed594f commit 7421933Copy full SHA for 7421933
1 file changed
src/diffusers/utils/pil_utils.py
@@ -21,14 +21,13 @@
21
"nearest": PIL.Image.NEAREST,
22
}
23
24
-# Maps VaeImageProcessor `resample` config strings to torch.nn.functional.interpolate modes.
25
-# "lanczos" has no native torch equivalent; bilinear+antialias is the closest high-quality substitute.
26
-# The bool indicates whether antialias=True should be passed (not supported for "nearest").
+# Resample modes natively supported by torch.nn.functional.interpolate.
+# Modes absent from this dict (e.g. "lanczos") are not supported; callers
+# should warn and fall back to default "nearest" behavior.
27
TORCH_INTERPOLATION = {
28
"linear": ("bilinear", True),
29
"bilinear": ("bilinear", True),
30
"bicubic": ("bicubic", True),
31
- "lanczos": ("bilinear", True),
32
"nearest": ("nearest", False),
33
34
0 commit comments