We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae84e40 commit fd0f469Copy full SHA for fd0f469
examples/textual_inversion/textual_inversion_sdxl.py
@@ -546,6 +546,8 @@ def __getitem__(self, i):
546
547
example["original_size"] = (image.height, image.width)
548
549
+ image = image.resize((self.size, self.size), resample=self.interpolation)
550
+
551
if self.center_crop:
552
y1 = max(0, int(round((image.height - self.size) / 2.0)))
553
x1 = max(0, int(round((image.width - self.size) / 2.0)))
@@ -576,7 +578,6 @@ def __getitem__(self, i):
576
578
img = np.array(image).astype(np.uint8)
577
579
580
image = Image.fromarray(img)
- image = image.resize((self.size, self.size), resample=self.interpolation)
581
582
image = self.flip_transform(image)
583
image = np.array(image).astype(np.uint8)
0 commit comments