mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 08:44:33 +02:00
Fix incorrect Resampling enum
This commit is contained in:
@@ -1687,7 +1687,7 @@ def preprocess_image(image: Image.Image):
|
||||
image = image.convert("RGB")
|
||||
w, h = image.size
|
||||
w, h = (x - x % 32 for x in (w, h))
|
||||
image = image.resize((w, h), resample=Image.LANCZOS)
|
||||
image = image.resize((w, h), resample=Image.Resampling.LANCZOS)
|
||||
image = np.array(image).astype(np.float32) / 255.0
|
||||
image = image[None].transpose(0, 3, 1, 2)
|
||||
image = torch.from_numpy(image)
|
||||
|
||||
Reference in New Issue
Block a user